From 8746ef2648bef46a35e2c632593ec16ecee5974c Mon Sep 17 00:00:00 2001 From: Maksim Beliaev Date: Thu, 28 Apr 2022 12:19:33 +0200 Subject: [PATCH] fix tests mypy --- responses/tests/test_matchers.py | 2 +- responses/tests/test_responses.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/responses/tests/test_matchers.py b/responses/tests/test_matchers.py index 20458ae5..3e68f972 100644 --- a/responses/tests/test_matchers.py +++ b/responses/tests/test_matchers.py @@ -409,7 +409,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) diff --git a/responses/tests/test_responses.py b/responses/tests/test_responses.py index 544a7aa4..2743f35f 100644 --- a/responses/tests/test_responses.py +++ b/responses/tests/test_responses.py @@ -714,7 +714,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" @@ -742,7 +744,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)