mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Ported app_client to ds_client where possible in test_auth.py, refs #1959
This commit is contained in:
parent
b077e63dc6
commit
425ac4357f
6 changed files with 91 additions and 67 deletions
|
|
@ -135,7 +135,9 @@ def prepare_jinja2_environment(env, datasette):
|
|||
@hookimpl
|
||||
def startup(datasette):
|
||||
async def inner():
|
||||
result = await datasette.get_database().execute("select 1 + 1")
|
||||
# Run against _internal so tests that use the ds_client fixture
|
||||
# (which has no databases yet on startup) do not fail:
|
||||
result = await datasette.get_database("_internal").execute("select 1 + 1")
|
||||
datasette._startup_hook_calculation = result.first()[0]
|
||||
|
||||
return inner
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue