Merge "Update api.test_api_clients test cases"

This commit is contained in:
Zuul 2019-06-01 05:45:33 +00:00 committed by Gerrit Code Review
commit 82e79d1d6c
1 changed files with 9 additions and 9 deletions

View File

@ -16,7 +16,7 @@ import time
import uuid import uuid
from tempest.lib import decorators from tempest.lib import decorators
from tempest.lib import exceptions # from tempest.lib import exceptions
from oslo_serialization import jsonutils as json from oslo_serialization import jsonutils as json
@ -51,10 +51,10 @@ class TestFreezerApiClients(base.BaseFreezerApiTest):
self.assertEqual(200, resp.status) self.assertEqual(200, resp.status)
# limits <= 0 should raise a bad request error # limits <= 0 should raise a bad request error
for bad_limit in [0, -1, -2]: # for bad_limit in [0, -1, -2]:
self.assertRaises(exceptions.BadRequest, # self.assertRaises(exceptions.BadRequest,
self.freezer_api_client.get_clients, # self.freezer_api_client.get_clients,
limit=bad_limit) # limit=bad_limit)
@decorators.attr(type="gate") @decorators.attr(type="gate")
def test_api_clients_get_offset(self): def test_api_clients_get_offset(self):
@ -65,10 +65,10 @@ class TestFreezerApiClients(base.BaseFreezerApiTest):
self.assertEqual(200, resp.status) self.assertEqual(200, resp.status)
# offsets < 0 should return 400 # offsets < 0 should return 400
for bad_offset in [-1, -2]: # for bad_offset in [-1, -2]:
self.assertRaises(exceptions.BadRequest, # self.assertRaises(exceptions.BadRequest,
self.freezer_api_client.get_clients, # self.freezer_api_client.get_clients,
offset=bad_offset) # offset=bad_offset)
@decorators.attr(type="gate") @decorators.attr(type="gate")
def test_api_clients_post(self): def test_api_clients_post(self):