From c8749995a88aeed9596272c7a8f073b8235e3ec9 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 4 Feb 2025 11:50:47 -0800 Subject: [PATCH] Try the event_loop fixture Refs https://github.com/simonw/datasette/issues/2461#issuecomment-2634920351 --- tests/test_auth.py | 2 +- tests/test_permissions.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_auth.py b/tests/test_auth.py index fd7fcc65e5..aa78a5de12 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -307,7 +307,7 @@ async def test_auth_with_dstok_token(ds_client, scenario, should_work): @pytest.mark.parametrize("expires", (None, 1000, -1000)) -def test_cli_create_token(app_client, expires): +def test_cli_create_token(event_loop, app_client, expires): secret = app_client.ds._secret runner = CliRunner(mix_stderr=False) args = ["create-token", "--secret", secret, "test"] diff --git a/tests/test_permissions.py b/tests/test_permissions.py index 3bb33ed711..32ffa6591e 100644 --- a/tests/test_permissions.py +++ b/tests/test_permissions.py @@ -929,7 +929,6 @@ async def test_actor_endpoint_allows_any_token(): } -@pytest.mark.serial @pytest.mark.parametrize( "options,expected", ( @@ -984,7 +983,7 @@ async def test_actor_endpoint_allows_any_token(): ), ), ) -def test_cli_create_token(options, expected): +def test_cli_create_token(event_loop, options, expected): runner = CliRunner() result1 = runner.invoke( cli,