openstack-python-openstackc.../openstackclient
Tang Chen 09c20b2b5c Fix mutable default arguments in tests
Python’s default arguments are evaluated only once
when the function is defined, not each time the
function is called. This means that if you use a
mutable default argument (like list and dict) and
mutate it, you will and have mutated that object
for all future calls to the function as well.

More details about this wrong usage here:
http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments

In unit tests, most FakeXXX classes' methods take
mutable arguments with default values [] or {}.
We should change them to None.

Change-Id: Iea833b66aa1379829511ad5c6d4432b72f3488e2
Closed-bug: #1550320
2016-04-20 11:15:17 +08:00
..
api Fix typos in docstrings and comments 2016-04-06 10:30:39 +07:00
common Propagate AttributeErrors when lazily loading plugins 2016-04-14 21:12:35 -07:00
compute Doc: Unify repeatable option comments 2016-04-12 15:57:17 +08:00
identity Doc: Unify repeatable option comments 2016-04-12 15:57:17 +08:00
image Image API v2: make volume_type optional 2016-03-18 16:08:30 -07:00
locale Imported Translations from Zanata 2016-04-19 06:14:07 +00:00
network Merge "Fix client certificate/key support for Network v2 commands" 2016-04-19 20:01:25 +00:00
object Add recursive object delete for containers 2016-02-05 11:18:46 -07:00
tests Fix mutable default arguments in tests 2016-04-20 11:15:17 +08:00
volume Add support for removing volume-type-access 2016-04-16 23:01:19 +05:30
__init__.py Change version reporting to use pbr 2013-08-02 12:11:49 -05:00
i18n.py Update translation setup 2016-01-29 08:18:50 +09:00
shell.py Rename --profile to --os-profile 2016-04-19 07:50:42 -05:00