Merge "Remove redundant default value None for dict.get"
This commit is contained in:
@@ -158,7 +158,7 @@ class TimezoneFixture(fixtures.Fixture):
|
|||||||
def __init__(self, new_tz):
|
def __init__(self, new_tz):
|
||||||
super(TimezoneFixture, self).__init__()
|
super(TimezoneFixture, self).__init__()
|
||||||
self.tz = new_tz
|
self.tz = new_tz
|
||||||
self.old_tz = os.environ.get('TZ', None)
|
self.old_tz = os.environ.get('TZ')
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TimezoneFixture, self).setUp()
|
super(TimezoneFixture, self).setUp()
|
||||||
|
|||||||
2
utils.py
2
utils.py
@@ -134,7 +134,7 @@ class TestResponse(requests.Response):
|
|||||||
self.headers.update(headers)
|
self.headers.update(headers)
|
||||||
# Fake the text attribute to streamline Response creation
|
# Fake the text attribute to streamline Response creation
|
||||||
# _content is defined by requests.Response
|
# _content is defined by requests.Response
|
||||||
self._content = data.get('text', None)
|
self._content = data.get('text')
|
||||||
else:
|
else:
|
||||||
self.status_code = data
|
self.status_code = data
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class FakeHTTPClient(fakes.FakeClient):
|
|||||||
(method, url, callback))
|
(method, url, callback))
|
||||||
|
|
||||||
# Note the call
|
# Note the call
|
||||||
self.callstack.append((method, url, kwargs.get('body', None)))
|
self.callstack.append((method, url, kwargs.get('body')))
|
||||||
|
|
||||||
if not hasattr(self, callback):
|
if not hasattr(self, callback):
|
||||||
raise AssertionError('Called unknown API method: %s %s, '
|
raise AssertionError('Called unknown API method: %s %s, '
|
||||||
@@ -56,7 +56,7 @@ class FakeHTTPClient(fakes.FakeClient):
|
|||||||
(method, url, callback))
|
(method, url, callback))
|
||||||
|
|
||||||
# Note the call
|
# Note the call
|
||||||
self.callstack.append((method, url, kwargs.get('body', None)))
|
self.callstack.append((method, url, kwargs.get('body')))
|
||||||
|
|
||||||
status, body = getattr(self, callback)(**kwargs)
|
status, body = getattr(self, callback)(**kwargs)
|
||||||
r = utils.TestResponse({
|
r = utils.TestResponse({
|
||||||
|
|||||||
Reference in New Issue
Block a user