Skip to content

Commit d324aa6

Browse files
author
Tang Chen
committed
Fix wrong type of volume attachments in FakeVolume
The volume attachments should be a list of dict, not a single dict. Change-Id: I3cec62bcb3953e4f38f9d3dd23f3eb6ef984464c
1 parent f36177e commit d324aa6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

openstackclient/tests/volume/v2/fakes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,10 @@ def create_one_volume(attrs={}):
256256
'key' + uuid.uuid4().hex: 'val' + uuid.uuid4().hex},
257257
'snapshot_id': random.randint(1, 5),
258258
'availability_zone': 'zone' + uuid.uuid4().hex,
259-
'attachments': {
259+
'attachments': [{
260260
'device': '/dev/' + uuid.uuid4().hex,
261-
'server_id': uuid.uuid4().hex},
261+
'server_id': uuid.uuid4().hex,
262+
}, ],
262263
}
263264

264265
# Overwrite default attributes if there are some attributes set

0 commit comments

Comments
 (0)