File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
services/web/server/tests/unit/with_dbs/01/groups Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,23 @@ async def test_list_user_groups_and_try_modify_organizations(
8585 key = by_gid ,
8686 ) == sorted (standard_groups , key = by_gid )
8787
88- for group in standard_groups :
88+ for i , group in enumerate ( standard_groups ) :
8989 # try to delete a group
9090 url = client .app .router ["delete_group" ].url_for (gid = f"{ group ['gid' ]} " )
9191 response = await client .delete (f"{ url } " )
9292 await assert_status (response , status .HTTP_403_FORBIDDEN )
9393
9494 # try to add some user in the group
9595 url = client .app .router ["add_group_user" ].url_for (gid = f"{ group ['gid' ]} " )
96- response = await client .post (f"{ url } " , json = {"uid" : logged_user ["id" ]})
96+
97+ if i % 2 == 0 :
98+ # by user-id
99+ params = {"uid" : logged_user ["id" ]}
100+ else :
101+ # by user name
102+ params = {"userName" : logged_user ["name" ]}
103+
104+ response = await client .post (f"{ url } " , json = params )
97105 await assert_status (response , status .HTTP_403_FORBIDDEN )
98106
99107 # try to modify the user in the group
You can’t perform that action at this time.
0 commit comments