Merge "Use more specific asserts in tests"

This commit is contained in:
Jenkins 2016-10-12 17:52:57 +00:00 committed by Gerrit Code Review
commit 165556a03d
2 changed files with 3 additions and 3 deletions

View File

@ -392,7 +392,7 @@ class APICoverage(object):
cover_api = None
def test_api_methods(self):
self.assertTrue(self.cover_api is not None)
self.assertIsNotNone(self.cover_api)
api_methods = [x for x in dir(self.cover_api)
if not x.startswith('_')]
test_methods = [x[5:] for x in dir(self)

View File

@ -132,8 +132,8 @@ class AggregateObjectDbTestCase(test.NoDBTestCase):
cell_db_agg = aggregate_obj.Aggregate.get_by_id(
self.context, ca2['id'])
self.assertEqual(api_db_agg.in_api, True)
self.assertEqual(cell_db_agg.in_api, False)
self.assertTrue(api_db_agg.in_api)
self.assertFalse(cell_db_agg.in_api)
def test_aggregate_get_from_db(self):
result = _create_aggregate_with_hosts(self.context)