From ed64b5ff620aa9dd3cfcd1c9f78dab22c8c3fc6e Mon Sep 17 00:00:00 2001 From: Alex Blank Date: Mon, 11 May 2026 21:39:12 +0200 Subject: [PATCH] fix: use @pytest_asyncio.fixture for async fixtures in test_engine.py --- backend/tests/test_engine.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(