mock.assert_called_once() is not valid method
There are a few places in tests/conductor/test_manager.py where calls to mock.assert_called_once() are made. The problem is that this isn't a valid mock method, and 'assert_called_once' isn't a valid method of whatever is being mocked. So it doesn't actually do anything. This replaces the assert_called_once() calls with valid assert_called_once_with() calls. Change-Id: I7d46cf866bcce3b7e09bc556f2a1ddd10e4d1ca5 Partial-Bug: #1365745
This commit is contained in:
parent
823bd59d61
commit
f011b430ae
@ -745,7 +745,7 @@ class DoNodeDeployTearDownTestCase(_ServiceSetUpMixin,
|
||||
self.assertIsNone(node.last_error)
|
||||
# Verify reservation has been cleared.
|
||||
self.assertIsNone(node.reservation)
|
||||
mock_deploy.assert_called_once()
|
||||
mock_deploy.assert_called_once_with(mock.ANY)
|
||||
|
||||
@mock.patch('ironic.drivers.modules.fake.FakeDeploy.deploy')
|
||||
def test_do_node_deploy_rebuild_deployfail_state(self, mock_deploy):
|
||||
@ -763,7 +763,7 @@ class DoNodeDeployTearDownTestCase(_ServiceSetUpMixin,
|
||||
self.assertIsNone(node.last_error)
|
||||
# Verify reservation has been cleared.
|
||||
self.assertIsNone(node.reservation)
|
||||
mock_deploy.assert_called_once()
|
||||
mock_deploy.assert_called_once_with(mock.ANY)
|
||||
|
||||
@mock.patch('ironic.drivers.modules.fake.FakeDeploy.deploy')
|
||||
def test_do_node_deploy_rebuild_error_state(self, mock_deploy):
|
||||
@ -781,7 +781,7 @@ class DoNodeDeployTearDownTestCase(_ServiceSetUpMixin,
|
||||
self.assertIsNone(node.last_error)
|
||||
# Verify reservation has been cleared.
|
||||
self.assertIsNone(node.reservation)
|
||||
mock_deploy.assert_called_once()
|
||||
mock_deploy.assert_called_once_with(mock.ANY)
|
||||
|
||||
def test_do_node_deploy_rebuild_nostate_state(self):
|
||||
# test node will not rebuild if state is NOSTATE
|
||||
|
Loading…
x
Reference in New Issue
Block a user