Skip to content

Commit

Permalink
Merge pull request #9 from simonsobs/dev
Browse files Browse the repository at this point in the history
Move a test module
  • Loading branch information
TaiSakuma authored Mar 22, 2024
2 parents b93f50c + b397029 commit 2c39ce8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
19 changes: 0 additions & 19 deletions tests/schema/conftest.py

This file was deleted.

11 changes: 10 additions & 1 deletion tests/schema/test_run.py → tests/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import asyncio
from collections.abc import AsyncIterator

import pytest
from async_asgi_testclient import TestClient
from nextlinegraphql import create_app
from nextlinegraphql.plugins.ctrl.graphql import SUBSCRIBE_STATE
from nextlinegraphql.plugins.graphql.test import gql_request, gql_subscribe
from pytest_httpx import HTTPXMock
Expand All @@ -15,8 +17,15 @@
)


async def test_run(client: TestClient):
@pytest.fixture
async def client() -> AsyncIterator[TestClient]:
app = create_app() # the plugin is loaded here
async with TestClient(app) as y:
await asyncio.sleep(0)
yield y


async def test_plugin(client: TestClient):
turned_on = asyncio.Event()
task = asyncio.create_task(subscribe_auto_mode_state(client, turned_on))

Expand Down

0 comments on commit 2c39ce8

Please sign in to comment.