@@ -63,7 +63,7 @@ def app_environment(
6363
6464@pytest .fixture
6565def partial_first_name () -> str :
66- return "James "
66+ return "Jaimito "
6767
6868
6969@pytest .fixture
@@ -145,9 +145,9 @@ async def test_search_users_by_partial_fullname(
145145 logged_user : UserInfoDict ,
146146 client : TestClient ,
147147 partial_first_name : str ,
148- public_user : UserInfoDict ,
149- semi_private_user : UserInfoDict ,
150148 private_user : UserInfoDict ,
149+ semi_private_user : UserInfoDict ,
150+ public_user : UserInfoDict ,
151151):
152152 assert client .app
153153 assert user_role .value == logged_user ["role" ]
@@ -177,9 +177,9 @@ async def test_search_users_by_partial_fullname(
177177
178178@pytest .mark .parametrize ("user_role" , [UserRole .USER ])
179179async def test_search_users_by_partial_email (
180+ user_role : UserRole ,
180181 logged_user : UserInfoDict ,
181182 client : TestClient ,
182- user_role : UserRole ,
183183 partial_email : str ,
184184 public_user : UserInfoDict ,
185185 semi_private_user : UserInfoDict ,
@@ -216,11 +216,12 @@ async def test_search_users_by_partial_email(
216216 await assert_status (resp , status .HTTP_403_FORBIDDEN )
217217
218218
219+ @pytest .mark .parametrize ("user_role" , [UserRole .USER ])
219220async def test_search_users_by_partial_username (
221+ user_role : UserRole ,
220222 logged_user : UserInfoDict ,
221223 client : TestClient ,
222224 partial_username : str ,
223- user_role : UserRole ,
224225 public_user : UserInfoDict ,
225226 semi_private_user : UserInfoDict ,
226227 private_user : UserInfoDict ,
@@ -249,18 +250,18 @@ async def test_search_users_by_partial_username(
249250 index = (index + 1 ) % 2
250251 assert found [index ].user_name == semi_private_user ["name" ]
251252 assert found [index ].email is None
252- assert found [index ].first_name is None
253- assert found [index ].last_name is None
253+ assert found [index ].first_name == semi_private_user . get ( "first_name" )
254+ assert found [index ].last_name == semi_private_user . get ( "last_name" )
254255
255256
256257@pytest .mark .acceptance_test (
257258 "https://github.com/ITISFoundation/osparc-issues/issues/1779"
258259)
259260@pytest .mark .parametrize ("user_role" , [UserRole .USER ])
260261async def test_get_user_by_group_id (
262+ user_role : UserRole ,
261263 logged_user : UserInfoDict ,
262264 client : TestClient ,
263- user_role : UserRole ,
264265 public_user : UserInfoDict ,
265266 private_user : UserInfoDict ,
266267):
@@ -329,9 +330,9 @@ async def test_access_rights_on_get_profile(
329330 ],
330331)
331332async def test_access_update_profile (
333+ user_role : UserRole ,
332334 logged_user : UserInfoDict ,
333335 client : TestClient ,
334- user_role : UserRole ,
335336 expected : HTTPStatus ,
336337):
337338 assert client .app
@@ -345,9 +346,9 @@ async def test_access_update_profile(
345346
346347@pytest .mark .parametrize ("user_role" , [UserRole .USER ])
347348async def test_get_profile (
349+ user_role : UserRole ,
348350 logged_user : UserInfoDict ,
349351 client : TestClient ,
350- user_role : UserRole ,
351352 primary_group : dict [str , Any ],
352353 standard_groups : list [dict [str , Any ]],
353354 all_group : dict [str , str ],
@@ -393,9 +394,9 @@ async def test_get_profile(
393394
394395@pytest .mark .parametrize ("user_role" , [UserRole .USER ])
395396async def test_update_profile (
397+ user_role : UserRole ,
396398 logged_user : UserInfoDict ,
397399 client : TestClient ,
398- user_role : UserRole ,
399400):
400401 assert client .app
401402
@@ -434,9 +435,9 @@ def _copy(data: dict, exclude: set) -> dict:
434435
435436@pytest .mark .parametrize ("user_role" , [UserRole .USER ])
436437async def test_profile_workflow (
438+ user_role : UserRole ,
437439 logged_user : UserInfoDict ,
438440 client : TestClient ,
439- user_role : UserRole ,
440441):
441442 assert client .app
442443
@@ -476,9 +477,9 @@ async def test_profile_workflow(
476477@pytest .mark .parametrize ("user_role" , [UserRole .USER ])
477478@pytest .mark .parametrize ("invalid_username" , ["" , "_foo" , "superadmin" , "foo..-123" ])
478479async def test_update_wrong_user_name (
480+ user_role : UserRole ,
479481 logged_user : UserInfoDict ,
480482 client : TestClient ,
481- user_role : UserRole ,
482483 invalid_username : str ,
483484):
484485 assert client .app
@@ -495,10 +496,10 @@ async def test_update_wrong_user_name(
495496
496497@pytest .mark .parametrize ("user_role" , [UserRole .USER ])
497498async def test_update_existing_user_name (
499+ user_role : UserRole ,
498500 user : UserInfoDict ,
499501 logged_user : UserInfoDict ,
500502 client : TestClient ,
501- user_role : UserRole ,
502503):
503504 assert client .app
504505
0 commit comments