From 689ba081730b7a9adb3f50240921a682b82839dd Mon Sep 17 00:00:00 2001 From: weiweigu Date: Tue, 12 Jul 2016 12:01:23 +0800 Subject: [PATCH] Replace assertEqual(None, *) with assertIsNone in tests Replace assertEqual(None, *) with assertIsNone in tests to have more clear messages in case of failure. Change-Id: Idb0376964ecc65d04e5b79753efd8f6a0b822bf8 Closes-Bug: #1280522 --- oslo_messaging/tests/notify/test_dispatcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_messaging/tests/notify/test_dispatcher.py b/oslo_messaging/tests/notify/test_dispatcher.py index 3818a7fd8..18744fabf 100644 --- a/oslo_messaging/tests/notify/test_dispatcher.py +++ b/oslo_messaging/tests/notify/test_dispatcher.py @@ -132,7 +132,7 @@ class TestDispatcher(test_utils.BaseTestCase): dispatcher = notify_dispatcher.NotificationDispatcher( [mock.Mock()], None) res = dispatcher.dispatch(mock.Mock(ctxt={}, message=msg)) - self.assertEqual(None, res) + self.assertIsNone(res) mylog.warning.assert_called_once_with('Unknown priority "%s"', 'what???')