Merge "Fix incorrect usage of assertEqual() in some tests"

This commit is contained in:
Jenkins 2015-10-13 17:33:25 +00:00 committed by Gerrit Code Review
commit 790dfa6c67
2 changed files with 14 additions and 14 deletions

View File

@ -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'])

View File

@ -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):