Skip to content

Commit

Permalink
fix integration tests (httpx removed app argument)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantownsend committed Dec 1, 2024
1 parent 89aa655 commit 18c1154
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
coveralls==3.3.1
httpx==0.27.2
httpx==0.28.0
pytest-cov==3.0.0
pytest==6.2.5
python-dateutil==2.8.2
Expand Down
4 changes: 2 additions & 2 deletions tests/apps/asgi/commands/files/dummy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import typing as t

from httpx import AsyncClient
from httpx import ASGITransport, AsyncClient


async def dummy_server(app: t.Union[str, t.Callable] = "app:app"):
Expand All @@ -24,7 +24,7 @@ async def dummy_server(app: t.Union[str, t.Callable] = "app:app"):
module = importlib.import_module(path)
app = t.cast(t.Callable, getattr(module, app_name))

async with AsyncClient(app=app) as client:
async with AsyncClient(transport=ASGITransport(app=app)) as client:
response = await client.get("http://localhost:8000")
if response.status_code != 200:
sys.exit("The app isn't callable!")
Expand Down

0 comments on commit 18c1154

Please sign in to comment.