Using assertIsNone() instead of assertEqual(None)
Following OpenStack Style Guidelines: [1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises [H203] Unit test assertions tend to give better messages for more specific assertions. As a result, assertIsNone(...) is preferred over assertEqual(None, ...) and assertIs(..., None) Change-Id: Iaf770fcd26bedfc2abb51b876ca87944dc4be9a4
This commit is contained in:
parent
fd12088a11
commit
4ba1ac55dd
|
@ -491,7 +491,7 @@ class RedfishOperationsTestCase(testtools.TestCase):
|
|||
_uefi_boot_mode_mock):
|
||||
_uefi_boot_mode_mock.return_value = False
|
||||
result = self.rf_client.get_persistent_boot_device()
|
||||
self.assertEqual(result, None)
|
||||
self.assertIsNone(result)
|
||||
|
||||
@mock.patch.object(redfish.RedfishOperations, '_get_sushy_system')
|
||||
def test_get_persistent_boot_device_cdrom_continuous(self,
|
||||
|
|
Loading…
Reference in New Issue