Skip to content

Commit 8cb9b84

Browse files
committed
Fix invalid assert_has_calls
This is to fix the invalid assert_has_calls usage, "assert_has_calls = " should be "assert_has_calls(". Change-Id: Id094dd90efde09b9a835d4492f4a92b8f8ad296e
1 parent 779fd5e commit 8cb9b84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nova/tests/unit/compute/test_compute_mgr.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10007,9 +10007,9 @@ def test_remove_remote_volume_connections(self, mock_remove_vol_conn):
1000710007

1000810008
self.compute._remove_remote_volume_connections(self.context, 'fake',
1000910009
bdms, instance)
10010-
mock_remove_vol_conn.assert_has_calls = [
10010+
mock_remove_vol_conn.assert_has_calls([
1001110011
mock.call(self.context, instance, bdm.volume_id, 'fake') for
10012-
bdm in bdms]
10012+
bdm in bdms])
1001310013

1001410014
@mock.patch('nova.compute.rpcapi.ComputeAPI.remove_volume_connection')
1001510015
def test_remove_remote_volume_connections_exc(self, mock_remove_vol_conn):
@@ -10036,9 +10036,9 @@ def test_rollback_volume_bdms(self, mock_delete_attachment):
1003610036
original_bdms, instance)
1003710037

1003810038
# Assert that we delete the current attachments
10039-
mock_delete_attachment.assert_has_calls = [
10039+
mock_delete_attachment.assert_has_calls([
1004010040
mock.call(self.context, uuids.vol1_attach),
10041-
mock.call(self.context, uuids.vol2_attach)]
10041+
mock.call(self.context, uuids.vol2_attach)])
1004210042
# Assert that we switch the attachment ids and connection_info for each
1004310043
# bdm back to their original values
1004410044
self.assertEqual(uuids.vol1_attach_original,

0 commit comments

Comments
 (0)