Deprecation warning in TestClient for httpx==0.27.0 #2523
-
As of Minimal working example consists of two files:
from starlette.applications import Starlette
from starlette.responses import JSONResponse
from starlette.routing import Route
async def homepage(request):
return JSONResponse({'hello': 'world'})
routes = [
Route("/", endpoint=homepage)
]
app = Starlette(debug=True, routes=routes)
from main import app
from starlette.testclient import TestClient
client = TestClient(app=app)
def test_ok():
resp = client.get('/')
assert resp.status_code == 200 Run: $ pytest test_main.py Output:
(venv) $ pip list | grep httpx
httpx 0.27.0
(venv) $ pip list | grep starlette
starlette 0.36.3 Refer to httpx PR: encode/httpx#3050 |
Beta Was this translation helpful? Give feedback.
Answered by
Kludex
Mar 19, 2024
Replies: 1 comment
-
This is solved on the latest Starlette release. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kludex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is solved on the latest Starlette release.