Merge "Use more specific asserts in tests"
This commit is contained in:
commit
165556a03d
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user