diff --git a/tests/test_testclient.py b/tests/test_testclient.py index a68e07927..5d8a4fbf2 100644 --- a/tests/test_testclient.py +++ b/tests/test_testclient.py @@ -424,7 +424,10 @@ async def app(scope: Scope, receive: Receive, send: Send) -> None: assert data == b"/hello-world" -def test_timeout_deprecation() -> None: +@pytest.mark.parametrize("method", ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]) +def test_timeout_deprecation(method: str) -> None: with pytest.deprecated_call(): client = TestClient(mock_service) - client.request("GET", "/", timeout=1) + client.request(method, "/", timeout=1) + method_call = getattr(client, method.lower()) + method_call("/", timeout=1)