def test_create_volume_and_modify_metadata(self): scenario = volumes.ModifyVolumeMetadata(self._get_context()) scenario._set_metadata = mock.Mock() scenario._delete_metadata = mock.Mock() scenario.run(sets=5, set_size=4, deletes=3, delete_size=2) scenario._set_metadata.assert_called_once_with("uuid", 5, 4) scenario._delete_metadata.assert_called_once_with( "uuid", scenario._set_metadata.return_value, 3, 2)
def test_create_volume_and_modify_metadata(self): mock_service = self.mock_cinder.return_value scenario = volumes.ModifyVolumeMetadata(self._get_context()) scenario.run(sets=5, set_size=4, deletes=3, delete_size=2) mock_service.set_metadata.assert_called_once_with("uuid", set_size=4, sets=5) mock_service.delete_metadata.assert_called_once_with( "uuid", keys=mock_service.set_metadata.return_value, deletes=3, delete_size=2)