Use assertTrue/False instead of assertEqual(T/F)

The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).

Change-Id: Id708a94ac461adf021893a05796163bd2ced153c
Closes-Bug:#1512207
This commit is contained in:
Swapnil Kulkarni (coolsvap) 2016-01-07 12:51:22 +05:30
parent b41a2cc940
commit c286e1ec4b
2 changed files with 3 additions and 3 deletions

View File

@ -228,7 +228,7 @@ class TestJsonType(base.TestCase):
value = vt.validate(0.123)
self.assertEqual(0.123, value)
value = vt.validate(True)
self.assertEqual(True, value)
self.assertTrue(value)
value = vt.validate([1, 2, 3])
self.assertEqual([1, 2, 3], value)
value = vt.validate({'foo': 'bar'})

View File

@ -40,7 +40,7 @@ class TestEventDispatcher(base.TestCase):
self.event_dispatcher.add_event_listener(Events.ALL,
listener)
self.assertEqual(True, self.event_dispatcher.has_listener(
self.assertTrue(self.event_dispatcher.has_listener(
Events.ALL, listener))
def test_remove_listener(self):
@ -49,7 +49,7 @@ class TestEventDispatcher(base.TestCase):
listener)
self.event_dispatcher.remove_event_listener(Events.ALL, listener)
self.assertEqual(False, self.event_dispatcher.has_listener(
self.assertFalse(self.event_dispatcher.has_listener(
Events.TRIGGER_AUDIT, listener))
def test_dispatch_event(self):