Skip to content

Commit f9e27bf

Browse files
fix tests
1 parent dedc4ff commit f9e27bf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

services/director-v2/tests/unit/with_dbs/comp_scheduler/test_db_repositories_comp_runs_snapshot_tasks.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
from collections.abc import Awaitable, Callable
8+
from typing import Any
89

910
from _helpers import PublishedProject
1011
from models_library.computations import CollectionRunID
@@ -35,6 +36,7 @@ async def test_list_computation_collection_run_tasks(
3536
],
3637
osparc_product_name: ProductName,
3738
fake_collection_run_id: CollectionRunID,
39+
with_product: dict[str, Any],
3840
):
3941
repo = CompRunsSnapshotTasksRepository(db_engine=sqlalchemy_async_engine)
4042

@@ -47,6 +49,7 @@ async def test_list_computation_collection_run_tasks(
4749
published_project.user,
4850
published_project.project,
4951
dag_adjacency_list=published_project.pipeline.dag_adjacency_list,
52+
collection_run_id=f"{fake_collection_run_id}",
5053
)
5154

5255
# 3. create snapshot tasks for that run
@@ -75,6 +78,7 @@ async def test_list_computation_collection_run_tasks_empty(
7578
sqlalchemy_async_engine: AsyncEngine,
7679
osparc_product_name: ProductName,
7780
fake_collection_run_id: CollectionRunID,
81+
with_product: dict[str, Any],
7882
):
7983
repo = CompRunsSnapshotTasksRepository(db_engine=sqlalchemy_async_engine)
8084
# Use a random user_id unlikely to have tasks
@@ -97,6 +101,7 @@ async def test_list_computation_collection_run_tasks_pagination(
97101
],
98102
osparc_product_name: ProductName,
99103
fake_collection_run_id: CollectionRunID,
104+
with_product: dict[str, Any],
100105
):
101106
repo = CompRunsSnapshotTasksRepository(db_engine=sqlalchemy_async_engine)
102107
published_project = await publish_project()
@@ -105,6 +110,7 @@ async def test_list_computation_collection_run_tasks_pagination(
105110
published_project.user,
106111
published_project.project,
107112
dag_adjacency_list=published_project.pipeline.dag_adjacency_list,
113+
collection_run_id=f"{fake_collection_run_id}",
108114
)
109115
snapshot_tasks = await create_comp_run_snapshot_tasks(
110116
user=published_project.user,
@@ -143,13 +149,15 @@ async def test_list_computation_collection_run_tasks_wrong_user(
143149
],
144150
osparc_product_name: ProductName,
145151
fake_collection_run_id: CollectionRunID,
152+
with_product: dict[str, Any],
146153
):
147154
repo = CompRunsSnapshotTasksRepository(db_engine=sqlalchemy_async_engine)
148155
published_project = await publish_project()
149156
run = await create_comp_run(
150157
published_project.user,
151158
published_project.project,
152159
dag_adjacency_list=published_project.pipeline.dag_adjacency_list,
160+
collection_run_id=f"{fake_collection_run_id}",
153161
)
154162
await create_comp_run_snapshot_tasks(
155163
user=published_project.user,
@@ -176,6 +184,7 @@ async def test_list_computation_collection_run_tasks_multiple_comp_runs_same_col
176184
],
177185
osparc_product_name: ProductName,
178186
fake_collection_run_id: CollectionRunID,
187+
with_product: dict[str, Any],
179188
):
180189
repo = CompRunsSnapshotTasksRepository(db_engine=sqlalchemy_async_engine)
181190
published_project1 = await publish_project()

0 commit comments

Comments
 (0)