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:
wangqi 2018-04-20 07:48:31 +00:00
parent fd12088a11
commit 4ba1ac55dd
1 changed files with 1 additions and 1 deletions

View File

@ -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,