Don't use pytest_asyncio.fixture(scope="session") any more, refs #1959

Also got rid of the weird memory=False hack:

https://github.com/simonw/datasette/pull/1960#issuecomment-1354053151
This commit is contained in:
Simon Willison 2022-12-15 17:38:22 -08:00
commit d94d363ec0
3 changed files with 14 additions and 13 deletions

View file

@ -117,7 +117,12 @@ def actor_from_request(datasette, request):
def permission_allowed(datasette, actor, action):
# Testing asyncio version of permission_allowed
async def inner():
assert 2 == (await datasette.get_database().execute("select 1 + 1")).first()[0]
assert (
2
== (
await datasette.get_database("_internal").execute("select 1 + 1")
).first()[0]
)
if action == "this_is_allowed_async":
return True
elif action == "this_is_denied_async":