Merge "assertIsNone(val) instead of assertEqual(None,val)"

This commit is contained in:
Jenkins 2015-12-22 06:32:28 +00:00 committed by Gerrit Code Review
commit c9fe899d2a
4 changed files with 5 additions and 6 deletions

View File

@ -285,4 +285,4 @@ class TestWithRealKafkaBroker(test_utils.BaseTestCase):
deadline = time.time() + 3
received_message = listener.poll(timeout=3)
self.assertEqual(0, int(deadline - time.time()))
self.assertEqual(None, received_message)
self.assertIsNone(received_message)

View File

@ -84,7 +84,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
n['priority'])
self.assertEqual('logrecord', n['event_type'])
self.assertEqual(str(timeutils.utcnow()), n['timestamp'])
self.assertEqual(None, n['publisher_id'])
self.assertIsNone(n['publisher_id'])
self.assertEqual(
{'process': os.getpid(),
'funcName': None,
@ -134,7 +134,7 @@ class TestLogNotifier(test_utils.BaseTestCase):
n['priority'])
self.assertEqual('logrecord', n['event_type'])
self.assertEqual(str(timeutils.utcnow()), n['timestamp'])
self.assertEqual(None, n['publisher_id'])
self.assertIsNone(n['publisher_id'])
pathname = __file__
if pathname.endswith(('.pyc', '.pyo')):
pathname = pathname[:-1]

View File

@ -76,7 +76,6 @@ class TestConfFixture(test_utils.BaseTestCase):
self.assertEqual([],
conf.oslo_messaging_notifications.driver)
self.assertEqual(None,
conf.oslo_messaging_notifications.transport_url)
self.assertIsNone(conf.oslo_messaging_notifications.transport_url)
self.assertEqual(['notifications'],
conf.oslo_messaging_notifications.topics)

View File

@ -56,7 +56,7 @@ class TimerTestCase(test_utils.BaseTestCase):
t = common.DecayingTimer()
t.start()
remaining = t.check_return()
self.assertEqual(None, remaining)
self.assertIsNone(remaining)
def test_no_duration_but_maximum(self):
t = common.DecayingTimer()