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/
This commit is contained in:
@@ -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:]):
|
||||
|
Reference in New Issue
Block a user