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: I4c4834191a33fd5a9a094c4f616eadc482317248
Closes-bug: #1280522
changes/56/257256/1
Shuquan Huang 7 years ago
parent 02fc79e5a6
commit c7e2b04c23
  1. 4
      ironic/tests/unit/drivers/test_utils.py

@ -148,7 +148,7 @@ class UtilsTestCase(db_base.DbTestCase):
shared=False) as task:
task.node.driver_info['ipmi_force_boot_device'] = True
ret = driver_utils.force_persistent_boot(task, 'pxe', True)
self.assertEqual(None, ret)
self.assertIsNone(ret)
task.node.refresh()
self.assertIn('persistent_boot_device',
task.node.driver_internal_info)
@ -157,7 +157,7 @@ class UtilsTestCase(db_base.DbTestCase):
with task_manager.acquire(self.context, self.node.uuid,
shared=False) as task:
ret = driver_utils.force_persistent_boot(task, 'pxe', False)
self.assertEqual(None, ret)
self.assertIsNone(ret)
task.node.refresh()
self.assertEqual(
False,

Loading…
Cancel
Save