Skip to content

Commit

Permalink
Merge branch 'staging' into update-vrs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Aug 5, 2024
2 parents 9dd4463 + 9d69a2d commit aa90292
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions server/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
"""Provide core fixtures for testing Flask functions."""

import asyncio
from collections.abc import Callable

import pytest
import pytest_asyncio
from curfu.main import app, get_domain_services, get_gene_services, start_fusor
from httpx import AsyncClient


@pytest.fixture(scope="session")
def event_loop(request):
"""Create an instance of the default event loop for each test case."""
loop = asyncio.get_event_loop_policy().new_event_loop()
yield loop
loop.close()
from httpx import ASGITransport, AsyncClient


@pytest_asyncio.fixture(scope="session")
Expand All @@ -23,7 +14,7 @@ async def async_client():
app.state.fusor = await start_fusor()
app.state.genes = get_gene_services()
app.state.domains = get_domain_services()
client = AsyncClient(app=app, base_url="http://test")
client = AsyncClient(transport=ASGITransport(app=app), base_url="http://test")
yield client
await client.aclose()

Expand Down

0 comments on commit aa90292

Please sign in to comment.