66
77
88import operator
9+ from collections .abc import Callable
910
1011import pytest
12+ import sqlalchemy as sa
1113from aiohttp .test_utils import TestClient
1214from models_library .api_schemas_webserver .groups import GroupGet , MyGroupsGet
1315from pydantic import TypeAdapter
1416from pytest_simcore .helpers .assert_checks import assert_status
17+ from pytest_simcore .helpers .typing_env import EnvVarsDict
1518from pytest_simcore .helpers .webserver_login import UserInfoDict
1619from pytest_simcore .helpers .webserver_parametrizations import (
1720 ExpectedResponse ,
3437@pytest .fixture
3538def client (
3639 event_loop ,
37- aiohttp_client ,
38- app_environment ,
39- postgres_db ,
40+ aiohttp_client : Callable ,
41+ app_environment : EnvVarsDict ,
42+ postgres_db : sa . engine . Engine ,
4043) -> TestClient :
4144 app = create_safe_application ()
4245
@@ -53,14 +56,11 @@ def client(
5356
5457
5558@pytest .mark .parametrize (* standard_role_response (), ids = str )
56- async def test_list_groups_access_rights (
59+ async def test_groups_access_rights (
5760 client : TestClient ,
5861 logged_user : UserInfoDict ,
5962 user_role : UserRole ,
6063 expected : ExpectedResponse ,
61- primary_group : dict [str , str ],
62- standard_groups : list [dict [str , str ]],
63- all_group : dict [str , str ],
6464):
6565 assert client .app
6666 url = client .app .router ["list_groups" ].url_for ()
@@ -73,7 +73,7 @@ async def test_list_groups_access_rights(
7373
7474
7575@pytest .mark .parametrize ("user_role" , [UserRole .USER ])
76- async def test_list_user_groups (
76+ async def test_list_user_groups_and_try_modify_organizations (
7777 client : TestClient ,
7878 user_role : UserRole ,
7979 standard_groups_owner : UserInfoDict ,
0 commit comments