Skip to content

Commit

Permalink
fix tests mypy
Browse files Browse the repository at this point in the history
(cherry picked from commit 8746ef2)
  • Loading branch information
beliaev-maksim committed Apr 28, 2022
1 parent f7c03a1 commit 69f12e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion responses/tests/test_matchers.py
Expand Up @@ -417,7 +417,7 @@ def run():
requests.post(
"http://httpbin.org/post",
data=req_data,
files={"file_name": b"New World!"},
files={"file_name": b"New World!"}, # type: ignore[arg-type]
)

msg = str(excinfo.value)
Expand Down
6 changes: 4 additions & 2 deletions responses/tests/test_responses.py
Expand Up @@ -717,7 +717,9 @@ def run():
match=[matchers.multipart_matcher(req_files, data=req_data)],
callback=request_callback,
)
resp = requests.post("http://httpbin.org/post", data=req_data, files=req_files)
resp = requests.post(
"http://httpbin.org/post", data=req_data, files=req_files # type: ignore[arg-type]
)
assert resp.text == "foo"
assert resp.headers["content-type"] == "application/json"

Expand Down Expand Up @@ -745,7 +747,7 @@ def run():
requests.post(
"http://httpbin.org/post",
data={"some": "other", "data": "wrong"},
files=req_files,
files=req_files, # type: ignore[arg-type]
)

assert "multipart/form-data doesn't match." in str(exc.value)
Expand Down

0 comments on commit 69f12e5

Please sign in to comment.