Skip to content

Commit fb42095

Browse files
fix
1 parent 049cd74 commit fb42095

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

services/web/server/tests/unit/with_dbs/01/groups/test_groups_repository.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111
from models_library.groups import GroupMember, StandardGroupCreate
1212
from pytest_simcore.helpers.webserver_users import UserInfoDict
1313
from simcore_postgres_database.models.users import UserRole
14-
from simcore_service_webserver.groups._groups_repository import (
15-
create_standard_group,
16-
delete_standard_group,
17-
list_users_in_group,
18-
)
14+
from simcore_service_webserver.groups import _groups_repository
1915

2016

2117
@pytest.fixture
@@ -30,7 +26,7 @@ async def _create_group(
3026
description: str = "A test group",
3127
thumbnail: str | None = None,
3228
):
33-
group, _ = await create_standard_group(
29+
group, _ = await _groups_repository.create_standard_group(
3430
app=client.app,
3531
user_id=logged_user["id"],
3632
create=StandardGroupCreate(
@@ -46,7 +42,7 @@ async def _create_group(
4642

4743
# Cleanup all created groups
4844
for group in created_groups:
49-
await delete_standard_group(
45+
await _groups_repository.delete_standard_group(
5046
app=client.app, user_id=logged_user["id"], group_id=group.gid
5147
)
5248

@@ -56,7 +52,7 @@ async def test_list_users_in_group_owner_only(
5652
client: TestClient,
5753
user_role: UserRole,
5854
logged_user: UserInfoDict,
59-
create_test_group,
55+
create_test_group: Callable[..., Coroutine[Any, Any, Any]],
6056
):
6157
"""Test list_users_in_group returns only the owner for a new group."""
6258
assert client.app
@@ -68,7 +64,9 @@ async def test_list_users_in_group_owner_only(
6864
)
6965

7066
# List users in the group - should only contain the owner
71-
users_in_group = await list_users_in_group(app=client.app, group_id=group.gid)
67+
users_in_group = await _groups_repository.list_users_in_group(
68+
app=client.app, group_id=group.gid
69+
)
7270

7371
# Should contain exactly one user (the owner)
7472
assert len(users_in_group) == 1

0 commit comments

Comments
 (0)