Browse Source

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
tags/5.0.0
Shuquan Huang 3 years ago
parent
commit
c7e2b04c23
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      ironic/tests/unit/drivers/test_utils.py

+ 2
- 2
ironic/tests/unit/drivers/test_utils.py View File

@@ -148,7 +148,7 @@ class UtilsTestCase(db_base.DbTestCase):
148 148
                                   shared=False) as task:
149 149
             task.node.driver_info['ipmi_force_boot_device'] = True
150 150
             ret = driver_utils.force_persistent_boot(task, 'pxe', True)
151
-            self.assertEqual(None, ret)
151
+            self.assertIsNone(ret)
152 152
             task.node.refresh()
153 153
             self.assertIn('persistent_boot_device',
154 154
                           task.node.driver_internal_info)
@@ -157,7 +157,7 @@ class UtilsTestCase(db_base.DbTestCase):
157 157
         with task_manager.acquire(self.context, self.node.uuid,
158 158
                                   shared=False) as task:
159 159
             ret = driver_utils.force_persistent_boot(task, 'pxe', False)
160
-            self.assertEqual(None, ret)
160
+            self.assertIsNone(ret)
161 161
             task.node.refresh()
162 162
             self.assertEqual(
163 163
                 False,

Loading…
Cancel
Save