Merge "Fix tests to correctly call reset_mock()"

This commit is contained in:
Zuul 2020-01-07 21:44:42 +00:00 committed by Gerrit Code Review
commit bc92de786c
2 changed files with 4 additions and 4 deletions

View File

@ -1413,7 +1413,7 @@ class TestControllerWorker(base.TestCase):
mock_update.assert_called_with(_db_session, '123',
provisioning_status=constants.ACTIVE)
mock_perform.reset
mock_perform.reset_mock()
_load_balancer_mock.amphorae = [
_amphora_mock, _amphora_mock2, _amphora_mock3]
_amphora_mock2.role = constants.ROLE_BACKUP
@ -1425,7 +1425,7 @@ class TestControllerWorker(base.TestCase):
mock_update.assert_called_with(_db_session, '123',
provisioning_status=constants.ACTIVE)
mock_perform.reset
mock_perform.reset_mock()
mock_perform.side_effect = OverflowError()
self.assertRaises(OverflowError, cw.failover_loadbalancer, 123)
mock_update.assert_called_with(_db_session, 123,

View File

@ -1466,7 +1466,7 @@ class TestControllerWorker(base.TestCase):
mock_update.assert_called_with(_db_session, '123',
provisioning_status=constants.ACTIVE)
mock_perform.reset
mock_perform.reset_mock()
_load_balancer_mock.amphorae = [
_amphora_mock, _amphora_mock2, _amphora_mock3]
_amphora_mock2.role = constants.ROLE_BACKUP
@ -1478,7 +1478,7 @@ class TestControllerWorker(base.TestCase):
mock_update.assert_called_with(_db_session, '123',
provisioning_status=constants.ACTIVE)
mock_perform.reset
mock_perform.reset_mock()
mock_perform.side_effect = OverflowError()
self.assertRaises(OverflowError, cw.failover_loadbalancer, 123)
mock_update.assert_called_with(_db_session, 123,