Merge "Using assertIsNone(xxx) instead of assertEqual(None, xxx)"

This commit is contained in:
Jenkins 2017-07-19 16:23:14 +00:00 committed by Gerrit Code Review
commit f0ef9ac787
3 changed files with 8 additions and 8 deletions

View File

@ -63,7 +63,7 @@ class TestConfigureBootAction(base.TestCase):
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID',
instance_boot_option='netboot')
result = action.run(self.context)
self.assertEqual(result, None)
self.assertIsNone(result)
self.node_update[0].update({'value': 'boot_option:netboot'})
self.ironic.node.update.assert_called_once_with(mock.ANY,
@ -72,7 +72,7 @@ class TestConfigureBootAction(base.TestCase):
def test_run_instance_boot_option_not_set(self):
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID')
result = action.run(self.context)
self.assertEqual(result, None)
self.assertIsNone(result)
self.node_update[0].update({'value': 'boot_option:local'})
self.ironic.node.update.assert_called_once_with(mock.ANY,
@ -85,7 +85,7 @@ class TestConfigureBootAction(base.TestCase):
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID')
result = action.run(self.context)
self.assertEqual(result, None)
self.assertIsNone(result)
self.node_update[0].update({'value': 'boot_option:netboot'})
self.ironic.node.update.assert_called_once_with(mock.ANY,
@ -99,7 +99,7 @@ class TestConfigureBootAction(base.TestCase):
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID',
instance_boot_option='local')
result = action.run(self.context)
self.assertEqual(result, None)
self.assertIsNone(result)
self.node_update[0].update({'value': 'boot_option:local'})
self.ironic.node.update.assert_called_once_with(mock.ANY,
@ -116,7 +116,7 @@ class TestConfigureBootAction(base.TestCase):
ramdisk_name='test_ramdisk')
result = action.run(self.context)
self.assertEqual(result, None)
self.assertIsNone(result)
self.node_update[1].update({'value': 'test_ramdisk_id'})
self.node_update[2].update({'value': 'test_kernel_id'})

View File

@ -38,7 +38,7 @@ class ClearBreakpointsActionTest(base.TestCase):
action = package_update.ClearBreakpointsAction(self.stack_id,
self.refs)
result = action.run(mock_ctx)
self.assertEqual(None, result)
self.assertIsNone(result)
mock_compute_client.assert_called_once()
mock_orchestration_client.assert_called_once()
mock_update_manager.assert_called_once_with(

View File

@ -615,7 +615,7 @@ class TestVerifyProfilesAction(base.TestCase):
self.assertEqual(expected.error['errors'].sort(),
result.error['errors'].sort())
self.assertEqual(expected.error['warnings'], result.error['warnings'])
self.assertEqual(None, result.data)
self.assertIsNone(result.data)
def test_not_enough_nodes(self):
self.nodes[:] = [self._get_fake_node(profile='compute')]
@ -677,7 +677,7 @@ class TestVerifyProfilesAction(base.TestCase):
self.assertEqual(expected.error['errors'].sort(),
result.error['errors'].sort())
self.assertEqual(expected.error['warnings'], result.error['warnings'])
self.assertEqual(None, result.data)
self.assertIsNone(result.data)
def test_no_spurious_warnings(self):
self.nodes[:] = [self._get_fake_node(profile=None)]