Skip to content

Commit bfa1685

Browse files
remove workbench
1 parent 1319020 commit bfa1685

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

services/web/server/tests/integration/01/test_computation.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
from settings_library.rabbit import RabbitSettings
2626
from settings_library.redis import RedisSettings
2727
from simcore_postgres_database.models.comp_runs_collections import comp_runs_collections
28-
from simcore_postgres_database.models.projects import projects
2928
from simcore_postgres_database.models.projects_metadata import projects_metadata
29+
from simcore_postgres_database.models.projects_nodes import projects_nodes
3030
from simcore_postgres_database.models.users import UserRole
3131
from simcore_postgres_database.webserver_models import (
3232
NodeClass,
@@ -245,17 +245,17 @@ def _get_project_workbench_from_db(
245245
# this check is only there to check the comp_pipeline is there
246246
print(f"--> looking for project {project_id=} in projects table...")
247247
with postgres_db.connect() as conn:
248-
project_in_db = conn.execute(
249-
sa.select(projects).where(projects.c.uuid == project_id)
250-
).fetchone()
248+
rows = (
249+
conn.execute(
250+
sa.select(projects_nodes).where(
251+
projects_nodes.c.project_uuid == project_id
252+
)
253+
)
254+
.mappings()
255+
.all()
256+
) # list[dict]
251257

252-
assert (
253-
project_in_db
254-
), f"missing pipeline in the database under comp_pipeline {project_id}"
255-
print(
256-
f"<-- found following workbench: {json_dumps(project_in_db.workbench, indent=2)}"
257-
)
258-
return project_in_db.workbench
258+
return {row["node_id"]: dict(row) for row in rows}
259259

260260

261261
async def _assert_and_wait_for_pipeline_state(

0 commit comments

Comments
 (0)