Skip to content

Commit 52460b9

Browse files
add proper encoding (#565)
1 parent c49dde2 commit 52460b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

responses/tests/test_responses.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,10 +1063,10 @@ def test_response_filebody():
10631063
def run():
10641064
current_file = os.path.abspath(__file__)
10651065
with responses.RequestsMock() as m:
1066-
with open(current_file, "r") as out:
1066+
with open(current_file, "r", encoding="utf-8") as out:
10671067
m.add(responses.GET, "http://example.com", body=out.read(), stream=True)
10681068
resp = requests.get("http://example.com", stream=True)
1069-
with open(current_file, "r") as out:
1069+
with open(current_file, "r", encoding="utf-8") as out:
10701070
assert resp.text == out.read()
10711071

10721072
run()

0 commit comments

Comments
 (0)