Merge "Use more specific asserts in tests"
This commit is contained in:
commit
165556a03d
@ -392,7 +392,7 @@ class APICoverage(object):
|
|||||||
cover_api = None
|
cover_api = None
|
||||||
|
|
||||||
def test_api_methods(self):
|
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)
|
api_methods = [x for x in dir(self.cover_api)
|
||||||
if not x.startswith('_')]
|
if not x.startswith('_')]
|
||||||
test_methods = [x[5:] for x in dir(self)
|
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(
|
cell_db_agg = aggregate_obj.Aggregate.get_by_id(
|
||||||
self.context, ca2['id'])
|
self.context, ca2['id'])
|
||||||
|
|
||||||
self.assertEqual(api_db_agg.in_api, True)
|
self.assertTrue(api_db_agg.in_api)
|
||||||
self.assertEqual(cell_db_agg.in_api, False)
|
self.assertFalse(cell_db_agg.in_api)
|
||||||
|
|
||||||
def test_aggregate_get_from_db(self):
|
def test_aggregate_get_from_db(self):
|
||||||
result = _create_aggregate_with_hosts(self.context)
|
result = _create_aggregate_with_hosts(self.context)
|
||||||
|
Loading…
Reference in New Issue
Block a user