From 7a4f019764c21c8e97ff6c91718cb1221d865f03 Mon Sep 17 00:00:00 2001 From: Javeme Date: Mon, 7 Dec 2015 21:03:41 +0800 Subject: [PATCH] remove the default arguments "{}" remove the default arguments "{}" when the function is defined. Change-Id: I81efaf299bc058208a5f553432068e93712cba83 ref: http://docs.python-guide.org/en/latest/writing/gotchas/ --- keystoneclient/tests/unit/test_session.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keystoneclient/tests/unit/test_session.py b/keystoneclient/tests/unit/test_session.py index a5c44748d..85d8399cd 100644 --- a/keystoneclient/tests/unit/test_session.py +++ b/keystoneclient/tests/unit/test_session.py @@ -328,7 +328,9 @@ class RedirectTests(utils.TestCase): DEFAULT_RESP_BODY = 'Found' def setup_redirects(self, method='GET', status_code=305, - redirect_kwargs={}, final_kwargs={}): + redirect_kwargs=None, final_kwargs=None): + redirect_kwargs = redirect_kwargs or {} + final_kwargs = final_kwargs or {} redirect_kwargs.setdefault('text', self.DEFAULT_REDIRECT_BODY) for s, d in zip(self.REDIRECT_CHAIN, self.REDIRECT_CHAIN[1:]):