Issue: #24
This commit is contained in:
parent
2b4c875da3
commit
3f7abc5986
1 changed files with 52 additions and 0 deletions
|
|
@ -136,3 +136,55 @@ async def test_post_iam_permissions_search_auth_approval(no_su_client: AsyncClie
|
|||
)
|
||||
assert resp.status_code != 422
|
||||
assert "has not been approved." in resp.json()["detail"]
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_delete_org_user_auth_approval(no_su_client: AsyncClient):
|
||||
resp = await no_su_client.delete("/org/user?org_id=3&user_id=1")
|
||||
|
||||
assert resp.status_code != 422
|
||||
assert "has not been approved." in resp.json()["detail"]
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_delete_preapproval_auth_approval(no_su_client: AsyncClient):
|
||||
resp = await no_su_client.delete("/org/self?org_id=3")
|
||||
|
||||
assert resp.status_code != 422
|
||||
assert resp.status_code == 204
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_post_user_invitation_auth_approval(no_su_client: AsyncClient):
|
||||
body = {"user_email": "admin@test.com", "organisation_id": 3}
|
||||
resp = await no_su_client.post("/user/invitation", json=body)
|
||||
|
||||
assert resp.status_code != 422
|
||||
assert "has not been approved." in resp.json()["detail"]
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_delete_group_permissions_auth_approval(no_su_client: AsyncClient):
|
||||
resp = await no_su_client.delete(
|
||||
"/iam/group/permission?org_id=3&group_id=1&perm_id=1"
|
||||
)
|
||||
|
||||
assert resp.status_code != 422
|
||||
assert "has not been approved." in resp.json()["detail"]
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_delete_group_users_success(no_su_client: AsyncClient):
|
||||
resp = await no_su_client.delete("/iam/group/user?org_id=3&group_id=1&user_id=1")
|
||||
|
||||
assert resp.status_code != 422
|
||||
assert "has not been approved." in resp.json()["detail"]
|
||||
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_put_group_user_invitation_success(no_su_client: AsyncClient):
|
||||
body = {"user_email": "admin@test.com", "organisation_id": 3, "group_id": 1}
|
||||
resp = await no_su_client.put("/iam/group/user/invitation", json=body)
|
||||
|
||||
assert resp.status_code != 422
|
||||
assert "has not been approved." in resp.json()["detail"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue