Skip to content

Commit df2e204

Browse files
fix test
1 parent 127e90a commit df2e204

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

services/web/server/tests/integration/01/notifications/test_rabbitmq_consumers.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
)
4141
from servicelib.rabbitmq import RabbitMQClient
4242
from settings_library.rabbit import RabbitSettings
43-
from simcore_postgres_database.models.projects import projects
43+
from simcore_postgres_database.models.projects_nodes import projects_nodes
4444
from simcore_postgres_database.models.users import UserRole
4545
from simcore_service_webserver.application_settings import setup_settings
4646
from simcore_service_webserver.db.plugin import setup_db
@@ -437,20 +437,18 @@ async def test_progress_computational_workflow(
437437

438438
# check the database. doing it after the waiting calls above is safe
439439
async with aiopg_engine.acquire() as conn:
440-
assert projects is not None
440+
assert projects_nodes is not None
441441
result = await conn.execute(
442-
sa.select(projects.c.workbench).where(
443-
projects.c.uuid == str(user_project_id)
442+
sa.select(projects_nodes).where(
443+
projects_nodes.c.project_uuid == f"{user_project_id}"
444444
)
445445
)
446-
row = await result.fetchone()
447-
assert row
448-
project_workbench = dict(row[projects.c.workbench])
446+
rows = await result.fetchall()
447+
assert rows
448+
node_dict = {row["node_id"]: dict(row) for row in rows}
449+
449450
# NOTE: the progress might still be present but is not used anymore
450-
assert (
451-
project_workbench[f"{random_node_id_in_user_project}"].get("progress", 0)
452-
== 0
453-
)
451+
assert node_dict[f"{random_node_id_in_user_project}"].get("progress", 0) == 0
454452

455453

456454
@pytest.mark.parametrize("user_role", [UserRole.GUEST], ids=str)

0 commit comments

Comments
 (0)