summaryrefslogtreecommitdiff
path: root/openstackclient/tests/compute/v2/fakes.py
diff options
context:
space:
mode:
authorting.wang <ting.wang@easystack.cn>2016-02-24 16:42:03 +0800
committerting.wang <ting.wang@easystack.cn>2016-02-24 18:57:02 +0800
commite0b6cab09bfe5d83435afe069d08820fcc1c5aa7 (patch)
treebb1e55db3708ab556345597388f32ceba28e234d /openstackclient/tests/compute/v2/fakes.py
parente5fe9a70718589b8ce7d455c3e2a3524f85510cb (diff)
downloadpython-openstackclient-e0b6cab09bfe5d83435afe069d08820fcc1c5aa7.tar.gz
Add some test cases for "server list" command
Add some test cases that test 'server list' command when specifying flavor or image. Because I add some attribution to fake.py, I have to change some code in create server test. Despite all this, I think it's good for testing. Change-Id: I714deac1f6f940b790a3c20af5f7ffa724ac44d1
Diffstat (limited to 'openstackclient/tests/compute/v2/fakes.py')
-rw-r--r--openstackclient/tests/compute/v2/fakes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/openstackclient/tests/compute/v2/fakes.py b/openstackclient/tests/compute/v2/fakes.py
index d2341ccc..0521c4c5 100644
--- a/openstackclient/tests/compute/v2/fakes.py
+++ b/openstackclient/tests/compute/v2/fakes.py
@@ -377,6 +377,12 @@ class FakeServer(object):
'id': 'server-id-' + uuid.uuid4().hex,
'name': 'server-name-' + uuid.uuid4().hex,
'metadata': {},
+ 'image': {
+ 'id': 'image-id-' + uuid.uuid4().hex,
+ },
+ 'flavor': {
+ 'id': 'flavor-id-' + uuid.uuid4().hex,
+ }
}
# Overwrite default attributes.