Skip to content

Commit

Permalink
test: improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
iudeen committed Jan 4, 2025
1 parent 4e43957 commit 7fbe688
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_testclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 7fbe688

Please sign in to comment.