From 69f12e5306d74532d4ddb97d53f2fef7730986e2 Mon Sep 17 00:00:00 2001 From: Maksim Beliaev Date: Thu, 28 Apr 2022 12:19:33 +0200 Subject: [PATCH] fix tests mypy (cherry picked from commit 8746ef2648bef46a35e2c632593ec16ecee5974c) --- 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 a5dee9b4..2e1a0902 100644 --- a/responses/tests/test_matchers.py +++ b/responses/tests/test_matchers.py @@ -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) diff --git a/responses/tests/test_responses.py b/responses/tests/test_responses.py index 4dd93f02..5b987d92 100644 --- a/responses/tests/test_responses.py +++ b/responses/tests/test_responses.py @@ -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" @@ -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)