Browse Source

Merge "Fix invalid assert_has_calls"

tags/22.0.0.0rc1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
76b2fbd90e
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      nova/tests/unit/compute/test_compute_mgr.py

+ 4
- 4
nova/tests/unit/compute/test_compute_mgr.py View File

@@ -10030,9 +10030,9 @@ class ComputeManagerMigrationTestCase(test.NoDBTestCase,

self.compute._remove_remote_volume_connections(self.context, 'fake',
bdms, instance)
mock_remove_vol_conn.assert_has_calls = [
mock_remove_vol_conn.assert_has_calls([
mock.call(self.context, instance, bdm.volume_id, 'fake') for
bdm in bdms]
bdm in bdms])

@mock.patch('nova.compute.rpcapi.ComputeAPI.remove_volume_connection')
def test_remove_remote_volume_connections_exc(self, mock_remove_vol_conn):
@@ -10059,9 +10059,9 @@ class ComputeManagerMigrationTestCase(test.NoDBTestCase,
original_bdms, instance)

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


Loading…
Cancel
Save