From 7c232a91f3f21692774dde93edecebbedba7e538 Mon Sep 17 00:00:00 2001 From: Tai Sakuma Date: Mon, 9 Sep 2024 13:02:38 -0400 Subject: [PATCH] Fix a test --- tests/plugins/ctrl/schema/mutations/test_interrupt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/plugins/ctrl/schema/mutations/test_interrupt.py b/tests/plugins/ctrl/schema/mutations/test_interrupt.py index f07409a..6fffbac 100644 --- a/tests/plugins/ctrl/schema/mutations/test_interrupt.py +++ b/tests/plugins/ctrl/schema/mutations/test_interrupt.py @@ -1,6 +1,7 @@ import asyncio from nextline import Nextline +from strawberry.types import ExecutionResult from nextlinegraphql.plugins.ctrl.graphql import MUTATE_INTERRUPT from tests.plugins.ctrl.schema.conftest import Schema @@ -18,9 +19,12 @@ async def test_schema(schema: Schema) -> None: async with nextline: task = asyncio.create_task(nextline.run_continue_and_wait(started=started)) - await started.wait() + await started.wait() # TODO: Update `started` so that `sleep()` is unnecessary + await asyncio.sleep(1) + result = await schema.execute(MUTATE_INTERRUPT, context_value=context) + assert isinstance(result, ExecutionResult) assert (data := result.data) assert data['ctrl']['interrupt'] is True