Skip to content

Commit 3eb5055

Browse files
committed
tests: replace pytest-asyncio with anyio
1 parent 180228e commit 3eb5055

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
from src.models import table_register
1313

1414

15-
@pytest.fixture
15+
@pytest.fixture(scope='session')
1616
def anyio_backend():
1717
return 'asyncio'
1818

1919

2020
@pytest.fixture(scope='session')
21-
def postgres_container():
21+
def postgres_container(anyio_backend):
2222
with PostgresContainer('postgres:16', driver='asyncpg') as postgres:
2323
yield postgres
2424

tests/test_routes.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
from http import HTTPStatus
22

3-
import pytest
43
from httpx import AsyncClient
54
from sqlalchemy.ext.asyncio import AsyncSession
65

76
from src.models import Ticket
87

9-
pytestmark = pytest.mark.anyio
10-
118

129
async def test_get_all_tickets_success(
1310
async_session: AsyncSession, async_client: AsyncClient

0 commit comments

Comments
 (0)