summaryrefslogtreecommitdiff
path: root/openstackclient/tests/image
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-04-20 20:22:55 +0000
committerGerrit Code Review <review@openstack.org>2016-04-20 20:22:55 +0000
commite78113a5fcc924eaed8f331b42b314949fc64b12 (patch)
tree767356866045cbab860496cd744e70ff68b35187 /openstackclient/tests/image
parent98a0fba3c1fc8e5fa231d07349cb38102b015cc4 (diff)
parent09c20b2b5c53024c47da8828095ea95dc63810f6 (diff)
downloadpython-openstackclient-e78113a5fcc924eaed8f331b42b314949fc64b12.tar.gz
Merge "Fix mutable default arguments in tests"
Diffstat (limited to 'openstackclient/tests/image')
-rw-r--r--openstackclient/tests/image/v2/fakes.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/openstackclient/tests/image/v2/fakes.py b/openstackclient/tests/image/v2/fakes.py
index 3555d2d4..f90d846d 100644
--- a/openstackclient/tests/image/v2/fakes.py
+++ b/openstackclient/tests/image/v2/fakes.py
@@ -181,7 +181,7 @@ class FakeImage(object):
"""
@staticmethod
- def create_one_image(attrs={}):
+ def create_one_image(attrs=None):
"""Create a fake image.
:param Dictionary attrs:
@@ -190,6 +190,8 @@ class FakeImage(object):
A FakeResource object with id, name, owner, protected,
visibility and tags attrs
"""
+ attrs = attrs or {}
+
# Set default attribute
image_info = {
'id': 'image-id' + uuid.uuid4().hex,
@@ -210,7 +212,7 @@ class FakeImage(object):
return image
@staticmethod
- def create_images(attrs={}, count=2):
+ def create_images(attrs=None, count=2):
"""Create multiple fake images.
:param Dictionary attrs: