summaryrefslogtreecommitdiff
path: root/heat/tests/test_template.py
diff options
context:
space:
mode:
authorJaveme <zhangmei.li@easystack.cn>2015-12-16 16:48:51 +0800
committerJaveme <zhangmei.li@easystack.cn>2015-12-16 16:48:51 +0800
commiteb68e1f55ee4d7d51bc75b9300619df093b093b8 (patch)
tree0218b70e14a4d41c856d80b26cf8b7d6ecbc1105 /heat/tests/test_template.py
parent4c649151cf6d0c8709bf503903c53b9ff6201442 (diff)
downloadheat-eb68e1f55ee4d7d51bc75b9300619df093b093b8.tar.gz
remove the mutable default arguments "[]" or "{}"
remove the default arguments "[]" or "{}" when the function is defined. ref: http://docs.python-guide.org/en/latest/writing/gotchas/ Change-Id: I93de22c6b3a48c3a0e6365756f8b6b5839844826
Diffstat (limited to 'heat/tests/test_template.py')
-rw-r--r--heat/tests/test_template.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/heat/tests/test_template.py b/heat/tests/test_template.py
index b6c149000..4a815fae9 100644
--- a/heat/tests/test_template.py
+++ b/heat/tests/test_template.py
@@ -89,7 +89,8 @@ class DummyClass(object):
class TemplatePluginFixture(fixtures.Fixture):
- def __init__(self, templates={}):
+ def __init__(self, templates=None):
+ templates = templates or {}
super(TemplatePluginFixture, self).__init__()
self.templates = [extension.Extension(k, None, v, None)
for (k, v) in templates.items()]