diff --git a/watcher/tests/api/v1/test_types.py b/watcher/tests/api/v1/test_types.py index 61cf2fba4..7557948a8 100644 --- a/watcher/tests/api/v1/test_types.py +++ b/watcher/tests/api/v1/test_types.py @@ -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'}) diff --git a/watcher/tests/common/messaging/event/test_event_dispatcher.py b/watcher/tests/common/messaging/event/test_event_dispatcher.py index 30ec8fd51..eebe7f2b8 100644 --- a/watcher/tests/common/messaging/event/test_event_dispatcher.py +++ b/watcher/tests/common/messaging/event/test_event_dispatcher.py @@ -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):