From 045f2e7e0618fdf22c260625d64554382afefde1 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 16 May 2022 12:32:25 +0100 Subject: volume: Correct output of 'volume attachment create' When adding these, we missed that the underlying cinder library call actually returns a dictionary and not a Resource-based object. This requires slightly different handling. Fix this. Change-Id: Ie065fe4198ae1238830cb619220e856390d4cb6e Signed-off-by: Stephen Finucane --- openstackclient/tests/unit/volume/v3/test_volume_attachment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'openstackclient/tests/unit') diff --git a/openstackclient/tests/unit/volume/v3/test_volume_attachment.py b/openstackclient/tests/unit/volume/v3/test_volume_attachment.py index 09f698e7..44fac6c5 100644 --- a/openstackclient/tests/unit/volume/v3/test_volume_attachment.py +++ b/openstackclient/tests/unit/volume/v3/test_volume_attachment.py @@ -73,8 +73,9 @@ class TestVolumeAttachmentCreate(TestVolumeAttachment): self.volumes_mock.get.return_value = self.volume self.servers_mock.get.return_value = self.server + # VolumeAttachmentManager.create returns a dict self.volume_attachments_mock.create.return_value = \ - self.volume_attachment + self.volume_attachment.to_dict() self.cmd = volume_attachment.CreateVolumeAttachment(self.app, None) -- cgit v1.2.1