File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class TestHTTPXTransport:
1616 @respx .mock
1717 def test_float_timeout () -> None :
1818 """``HTTPXTransport`` works with a float timeout."""
19- respx .post (url = "https://example.com/test" ).mock (
19+ route = respx .post (url = "https://example.com/test" ).mock (
2020 return_value = httpx .Response (
2121 status_code = HTTPStatus .OK ,
2222 text = "OK" ,
@@ -30,6 +30,7 @@ def test_float_timeout() -> None:
3030 data = b"hello" ,
3131 timeout = 30.0 ,
3232 )
33+ assert route .called
3334 assert isinstance (response , Response )
3435 assert response .status_code == HTTPStatus .OK
3536 assert response .text == "OK"
@@ -41,7 +42,7 @@ def test_tuple_timeout() -> None:
4142 """``HTTPXTransport`` works with a (connect, read) timeout
4243 tuple.
4344 """
44- respx .post (url = "https://example.com/test" ).mock (
45+ route = respx .post (url = "https://example.com/test" ).mock (
4546 return_value = httpx .Response (
4647 status_code = HTTPStatus .OK ,
4748 text = "OK" ,
@@ -55,5 +56,6 @@ def test_tuple_timeout() -> None:
5556 data = b"hello" ,
5657 timeout = (5.0 , 30.0 ),
5758 )
59+ assert route .called
5860 assert isinstance (response , Response )
5961 assert response .status_code == HTTPStatus .OK
You can’t perform that action at this time.
0 commit comments