Skip to content

Commit

Permalink
Merge "Fix invalid assert_has_calls" into stable/ussuri
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Oct 23, 2020
2 parents e676a48 + 674d1cb commit 29425d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nova/tests/unit/compute/test_compute_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9815,9 +9815,9 @@ def test_remove_remote_volume_connections(self, mock_remove_vol_conn):

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):
Expand All @@ -9844,9 +9844,9 @@ def test_rollback_volume_bdms(self, mock_delete_attachment):
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,
Expand Down

0 comments on commit 29425d6

Please sign in to comment.