Skip to content

Commit 702b60e

Browse files
committed
test scope fixes
1 parent 4c9ee1a commit 702b60e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backend/app/db/repositories/execution_repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ async def get_executions(
133133
resource_usage_data = doc.get("resource_usage")
134134
executions.append(
135135
DomainExecution(
136-
execution_id=str(doc.get("execution_id", "")),
136+
execution_id=doc["execution_id"],
137137
script=doc.get("script", ""),
138138
status=ExecutionStatus(str(sv)),
139139
stdout=doc.get("stdout"),

backend/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def create_test_app():
126126

127127

128128
# ===== App without lifespan for tests =====
129-
@pytest_asyncio.fixture(scope="session")
129+
@pytest_asyncio.fixture(scope="session", loop_scope="session")
130130
async def app():
131131
"""Create FastAPI app once per session/worker to avoid Pydantic schema crashes."""
132132
application = create_test_app()
@@ -138,7 +138,7 @@ async def app():
138138
await container.close()
139139

140140

141-
@pytest_asyncio.fixture(scope="session")
141+
@pytest_asyncio.fixture(scope="session", loop_scope="session")
142142
async def app_container(app): # type: ignore[valid-type]
143143
"""Expose the Dishka container attached to the app."""
144144
container: AsyncContainer = app.state.dishka_container # type: ignore[attr-defined]

0 commit comments

Comments
 (0)