mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
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:
parent
95900b9d02
commit
d94d363ec0
3 changed files with 14 additions and 13 deletions
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue