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
changes/51/340651/1
weiweigu 6 years ago
parent c6c70aba2d
commit 689ba08173
  1. 2
      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???')

Loading…
Cancel
Save