Merge "Using assertIsNone(xxx) instead of assertEqual(None, xxx)"
This commit is contained in:
commit
f0ef9ac787
@ -63,7 +63,7 @@ class TestConfigureBootAction(base.TestCase):
|
|||||||
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID',
|
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID',
|
||||||
instance_boot_option='netboot')
|
instance_boot_option='netboot')
|
||||||
result = action.run(self.context)
|
result = action.run(self.context)
|
||||||
self.assertEqual(result, None)
|
self.assertIsNone(result)
|
||||||
|
|
||||||
self.node_update[0].update({'value': 'boot_option:netboot'})
|
self.node_update[0].update({'value': 'boot_option:netboot'})
|
||||||
self.ironic.node.update.assert_called_once_with(mock.ANY,
|
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):
|
def test_run_instance_boot_option_not_set(self):
|
||||||
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID')
|
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID')
|
||||||
result = action.run(self.context)
|
result = action.run(self.context)
|
||||||
self.assertEqual(result, None)
|
self.assertIsNone(result)
|
||||||
|
|
||||||
self.node_update[0].update({'value': 'boot_option:local'})
|
self.node_update[0].update({'value': 'boot_option:local'})
|
||||||
self.ironic.node.update.assert_called_once_with(mock.ANY,
|
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')
|
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID')
|
||||||
result = action.run(self.context)
|
result = action.run(self.context)
|
||||||
self.assertEqual(result, None)
|
self.assertIsNone(result)
|
||||||
|
|
||||||
self.node_update[0].update({'value': 'boot_option:netboot'})
|
self.node_update[0].update({'value': 'boot_option:netboot'})
|
||||||
self.ironic.node.update.assert_called_once_with(mock.ANY,
|
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',
|
action = baremetal.ConfigureBootAction(node_uuid='MOCK_UUID',
|
||||||
instance_boot_option='local')
|
instance_boot_option='local')
|
||||||
result = action.run(self.context)
|
result = action.run(self.context)
|
||||||
self.assertEqual(result, None)
|
self.assertIsNone(result)
|
||||||
|
|
||||||
self.node_update[0].update({'value': 'boot_option:local'})
|
self.node_update[0].update({'value': 'boot_option:local'})
|
||||||
self.ironic.node.update.assert_called_once_with(mock.ANY,
|
self.ironic.node.update.assert_called_once_with(mock.ANY,
|
||||||
@ -116,7 +116,7 @@ class TestConfigureBootAction(base.TestCase):
|
|||||||
ramdisk_name='test_ramdisk')
|
ramdisk_name='test_ramdisk')
|
||||||
result = action.run(self.context)
|
result = action.run(self.context)
|
||||||
|
|
||||||
self.assertEqual(result, None)
|
self.assertIsNone(result)
|
||||||
|
|
||||||
self.node_update[1].update({'value': 'test_ramdisk_id'})
|
self.node_update[1].update({'value': 'test_ramdisk_id'})
|
||||||
self.node_update[2].update({'value': 'test_kernel_id'})
|
self.node_update[2].update({'value': 'test_kernel_id'})
|
||||||
|
@ -38,7 +38,7 @@ class ClearBreakpointsActionTest(base.TestCase):
|
|||||||
action = package_update.ClearBreakpointsAction(self.stack_id,
|
action = package_update.ClearBreakpointsAction(self.stack_id,
|
||||||
self.refs)
|
self.refs)
|
||||||
result = action.run(mock_ctx)
|
result = action.run(mock_ctx)
|
||||||
self.assertEqual(None, result)
|
self.assertIsNone(result)
|
||||||
mock_compute_client.assert_called_once()
|
mock_compute_client.assert_called_once()
|
||||||
mock_orchestration_client.assert_called_once()
|
mock_orchestration_client.assert_called_once()
|
||||||
mock_update_manager.assert_called_once_with(
|
mock_update_manager.assert_called_once_with(
|
||||||
|
@ -615,7 +615,7 @@ class TestVerifyProfilesAction(base.TestCase):
|
|||||||
self.assertEqual(expected.error['errors'].sort(),
|
self.assertEqual(expected.error['errors'].sort(),
|
||||||
result.error['errors'].sort())
|
result.error['errors'].sort())
|
||||||
self.assertEqual(expected.error['warnings'], result.error['warnings'])
|
self.assertEqual(expected.error['warnings'], result.error['warnings'])
|
||||||
self.assertEqual(None, result.data)
|
self.assertIsNone(result.data)
|
||||||
|
|
||||||
def test_not_enough_nodes(self):
|
def test_not_enough_nodes(self):
|
||||||
self.nodes[:] = [self._get_fake_node(profile='compute')]
|
self.nodes[:] = [self._get_fake_node(profile='compute')]
|
||||||
@ -677,7 +677,7 @@ class TestVerifyProfilesAction(base.TestCase):
|
|||||||
self.assertEqual(expected.error['errors'].sort(),
|
self.assertEqual(expected.error['errors'].sort(),
|
||||||
result.error['errors'].sort())
|
result.error['errors'].sort())
|
||||||
self.assertEqual(expected.error['warnings'], result.error['warnings'])
|
self.assertEqual(expected.error['warnings'], result.error['warnings'])
|
||||||
self.assertEqual(None, result.data)
|
self.assertIsNone(result.data)
|
||||||
|
|
||||||
def test_no_spurious_warnings(self):
|
def test_no_spurious_warnings(self):
|
||||||
self.nodes[:] = [self._get_fake_node(profile=None)]
|
self.nodes[:] = [self._get_fake_node(profile=None)]
|
||||||
|
Loading…
Reference in New Issue
Block a user