Skip to content

Commit e86eee7

Browse files
committed
Code formatting updates using 'black'
1 parent a9dab5b commit e86eee7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

responses.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def _url_matches(self, url, other, match_querystring=False):
313313
return False
314314

315315
def get_headers(self):
316-
headers = HTTPHeaderDict() # Duplicate headers are legal
316+
headers = HTTPHeaderDict() # Duplicate headers are legal
317317
if self.content_type is not None:
318318
headers["Content-Type"] = self.content_type
319319
if self.headers:
@@ -380,7 +380,7 @@ def get_response(self, request):
380380
# having an original response object with the headers as the `msg`, so
381381
# we give it what it needs.
382382
orig_response = HTTPResponse(
383-
body=body, # required to avoid "ValueError: Unable to determine whether fp is closed."
383+
body=body, # required to avoid "ValueError: Unable to determine whether fp is closed."
384384
msg=headers,
385385
preload_content=False,
386386
)
@@ -421,7 +421,7 @@ def get_response(self, request):
421421
# having an original response object with the headers as the `msg`, so
422422
# we give it what it needs.
423423
orig_response = HTTPResponse(
424-
body=body, # required to avoid "ValueError: Unable to determine whether fp is closed."
424+
body=body, # required to avoid "ValueError: Unable to determine whether fp is closed."
425425
msg=headers,
426426
preload_content=False,
427427
)

test_responses.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def run():
657657
assert resp.status_code == status
658658
assert "session_id" in resp.cookies
659659
assert resp.cookies["session_id"] == "12345"
660-
assert set(resp.cookies.keys()) == set(['session_id'])
660+
assert set(resp.cookies.keys()) == set(["session_id"])
661661

662662
run()
663663
assert_reset()
@@ -680,7 +680,7 @@ def run():
680680
assert resp.status_code == status
681681
assert "session_id" in resp.cookies
682682
assert resp.cookies["session_id"] == "12345"
683-
assert set(resp.cookies.keys()) == set(['session_id'])
683+
assert set(resp.cookies.keys()) == set(["session_id"])
684684

685685
run()
686686
assert_reset()
@@ -690,8 +690,8 @@ def test_response_cookies_multiple():
690690
body = b"test callback"
691691
status = 200
692692
headers = [
693-
("set-cookie", '1P_JAR=2019-12-31-23; path=/; domain=.example.com; HttpOnly'),
694-
("set-cookie", 'NID=some=value; path=/; domain=.example.com; secure'),
693+
("set-cookie", "1P_JAR=2019-12-31-23; path=/; domain=.example.com; HttpOnly"),
694+
("set-cookie", "NID=some=value; path=/; domain=.example.com; secure"),
695695
]
696696
url = "http://example.com/"
697697

@@ -704,7 +704,7 @@ def run():
704704
resp = requests.get(url)
705705
assert resp.text == "test callback"
706706
assert resp.status_code == status
707-
assert set(resp.cookies.keys()) == set(['1P_JAR', 'NID'])
707+
assert set(resp.cookies.keys()) == set(["1P_JAR", "NID"])
708708
assert resp.cookies["1P_JAR"] == "2019-12-31-23"
709709
assert resp.cookies["NID"] == "some=value"
710710

0 commit comments

Comments
 (0)