mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
New "startup" plugin hook, closes #834
This commit is contained in:
parent
b906030235
commit
09a3479a54
8 changed files with 61 additions and 0 deletions
|
|
@ -572,3 +572,9 @@ def test_register_routes_asgi(app_client):
|
|||
response = app_client.get("/three/")
|
||||
assert {"hello": "world"} == response.json
|
||||
assert "1" == response.headers["x-three"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_startup(app_client):
|
||||
await app_client.ds.invoke_startup()
|
||||
assert app_client.ds._startup_hook_fired
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue