diff --git a/backend/tests/test_engine.py b/backend/tests/test_engine.py index 678e02b..ecbad4b 100644 --- a/backend/tests/test_engine.py +++ b/backend/tests/test_engine.py @@ -1,4 +1,5 @@ import pytest +import pytest_asyncio import tempfile import os from pathlib import Path @@ -6,7 +7,7 @@ from sqlalchemy.ext.asyncio import AsyncSession from app.models import Source, Job, JobExecution from backup.engine import BackupEngine -@pytest.fixture +@pytest_asyncio.fixture async def test_source(db: AsyncSession): with tempfile.TemporaryDirectory() as tmpdir: # Create test files @@ -24,7 +25,7 @@ async def test_source(db: AsyncSession): await db.refresh(source) yield source -@pytest.fixture +@pytest_asyncio.fixture async def test_job(db: AsyncSession, test_source): with tempfile.TemporaryDirectory() as tmpdir: job = Job(