sections: upgrade_guide:fixing-async-with-httpx-asyncclient-app-app
This data as json
| id | page | ref | title | content | breadcrumbs | references |
|---|---|---|---|---|---|---|
| upgrade_guide:fixing-async-with-httpx-asyncclient-app-app | upgrade_guide | fixing-async-with-httpx-asyncclient-app-app | Fixing async with httpx.AsyncClient(app=app) | Some older plugins may use the following pattern in their tests, which is no longer supported: app = Datasette([], memory=True).app() async with httpx.AsyncClient(app=app) as client: response = await client.get("http://localhost/path") The new pattern is to use ds.client like this: ds = Datasette([], memory=True) response = await ds.client.get("/path") | ["Upgrade guide", "Datasette 1.0a20 plugin upgrade guide"] | [] |