Skip to content

Commit 50527ee

Browse files
fixes tests in postgres package
1 parent a5b1ecc commit 50527ee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/postgres-database/tests/test_utils_comp_runs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
import pytest
66
import sqlalchemy as sa
7+
from faker import Faker
78
from simcore_postgres_database.models.comp_runs import comp_runs
89
from simcore_postgres_database.utils_comp_runs import get_latest_run_id_for_project
910
from sqlalchemy.ext.asyncio import AsyncEngine
1011

1112

1213
@pytest.fixture
13-
async def sample_comp_runs(asyncpg_engine: AsyncEngine):
14+
async def sample_comp_runs(asyncpg_engine: AsyncEngine, faker: Faker):
1415
async with asyncpg_engine.begin() as conn:
1516
await conn.execute(sa.text("SET session_replication_role = replica;"))
1617
await conn.execute(sa.delete(comp_runs))
@@ -37,6 +38,7 @@ async def sample_comp_runs(asyncpg_engine: AsyncEngine):
3738
"metadata": None,
3839
"use_on_demand_clusters": False,
3940
"dag_adjacency_list": {},
41+
"collection_run_id": faker.uuid4(),
4042
},
4143
{
4244
"run_id": 2,
@@ -58,6 +60,7 @@ async def sample_comp_runs(asyncpg_engine: AsyncEngine):
5860
"metadata": None,
5961
"use_on_demand_clusters": False,
6062
"dag_adjacency_list": {},
63+
"collection_run_id": faker.uuid4(),
6164
},
6265
{
6366
"run_id": 3,
@@ -79,6 +82,7 @@ async def sample_comp_runs(asyncpg_engine: AsyncEngine):
7982
"metadata": None,
8083
"use_on_demand_clusters": False,
8184
"dag_adjacency_list": {},
85+
"collection_run_id": faker.uuid4(),
8286
},
8387
{
8488
"run_id": 4,
@@ -100,6 +104,7 @@ async def sample_comp_runs(asyncpg_engine: AsyncEngine):
100104
"metadata": None,
101105
"use_on_demand_clusters": False,
102106
"dag_adjacency_list": {},
107+
"collection_run_id": faker.uuid4(),
103108
},
104109
],
105110
)

0 commit comments

Comments
 (0)