Merge "Fix incorrect usage of assertEqual() in some tests"
This commit is contained in:
commit
790dfa6c67
@ -74,8 +74,8 @@ class TestHealth(base.V1_1FunctionalTestBase):
|
||||
self.assertEqual(200, response.status_code)
|
||||
health = response.json()
|
||||
|
||||
self.assertEqual(True, health['catalog_reachable'])
|
||||
self.assertEqual(True, health[pool_name]['storage_reachable'])
|
||||
self.assertTrue(health['catalog_reachable'])
|
||||
self.assertTrue(health[pool_name]['storage_reachable'])
|
||||
op_status = health[pool_name]['operation_status']
|
||||
for op in op_status.keys():
|
||||
self.assertTrue(op_status[op]['succeeded'])
|
||||
|
@ -133,18 +133,18 @@ class QueueControllerTest(ControllerBaseTest):
|
||||
detailed=True)
|
||||
queues = list(next(interaction))
|
||||
|
||||
self.assertEqual(True, all(map(lambda queue:
|
||||
'name' in queue and
|
||||
'metadata' in queue, queues)))
|
||||
self.assertTrue(all(map(lambda queue:
|
||||
'name' in queue and
|
||||
'metadata' in queue, queues)))
|
||||
self.assertEqual(10, len(queues))
|
||||
|
||||
interaction = self.controller.list(project=project,
|
||||
marker=next(interaction))
|
||||
queues = list(next(interaction))
|
||||
|
||||
self.assertEqual(True, all(map(lambda queue:
|
||||
'name' in queue and
|
||||
'metadata' not in queue, queues)))
|
||||
self.assertTrue(all(map(lambda queue:
|
||||
'name' in queue and
|
||||
'metadata' not in queue, queues)))
|
||||
|
||||
self.assertEqual(5, len(queues))
|
||||
|
||||
@ -1004,9 +1004,9 @@ class SubscriptionControllerTest(ControllerBaseTest):
|
||||
project=self.project)
|
||||
subscriptions = list(next(interaction))
|
||||
|
||||
self.assertEqual(True, all(map(lambda s:
|
||||
'source' in s and 'subscriber' in s,
|
||||
subscriptions)))
|
||||
self.assertTrue(all(map(lambda s:
|
||||
'source' in s and 'subscriber' in s,
|
||||
subscriptions)))
|
||||
self.assertEqual(10, len(subscriptions))
|
||||
|
||||
interaction = (self.subscription_controller.list(self.source,
|
||||
@ -1014,9 +1014,9 @@ class SubscriptionControllerTest(ControllerBaseTest):
|
||||
marker=next(interaction)))
|
||||
subscriptions = list(next(interaction))
|
||||
|
||||
self.assertEqual(True, all(map(lambda s:
|
||||
'source' in s and 'subscriber' in s,
|
||||
subscriptions)))
|
||||
self.assertTrue(all(map(lambda s:
|
||||
'source' in s and 'subscriber' in s,
|
||||
subscriptions)))
|
||||
self.assertEqual(5, len(subscriptions))
|
||||
|
||||
def test_get_raises_if_subscription_does_not_exist(self):
|
||||
|
Loading…
Reference in New Issue
Block a user