1
0
Fork 0
forked from sr2/cloud-api

fix: ty compliant & issues from change to mapped columns

This commit is contained in:
Chris Milne 2026-06-22 11:23:24 +01:00
parent 55927946c7
commit 58e7ae6c5c
31 changed files with 271 additions and 254 deletions

View file

@ -25,9 +25,7 @@ async def test_post_act_on_resource_endpoint_success(default_client: AsyncClient
"Authorization": "Bearer not_checked_when_auth_is_disabled",
"X-API-Key": "123456789",
}
resp = await default_client.post(
"/iam/can_act_on_resource", json=body, headers=headers
)
resp = await default_client.post("/iam/can_act_on_resource", json=body, headers=headers)
data = resp.json()
assert resp.status_code == 200
@ -56,9 +54,7 @@ async def test_act_on_resource_wrong_key(
"Authorization": "Bearer not_checked_when_auth_is_disabled",
"X-API-Key": api_key,
}
resp = await default_client.post(
"/iam/can_act_on_resource", json=body, headers=headers
)
resp = await default_client.post("/iam/can_act_on_resource", json=body, headers=headers)
data = resp.json()
assert resp.status_code == 401
@ -110,9 +106,7 @@ async def test_act_on_resource_endpoint_status_checks(
"Authorization": "Bearer not_checked_when_auth_is_disabled",
"X-API-Key": "123456789",
}
resp = await default_client.post(
"/iam/can_act_on_resource", json=body, headers=headers
)
resp = await default_client.post("/iam/can_act_on_resource", json=body, headers=headers)
assert resp.status_code == expected_status
@ -143,9 +137,7 @@ async def test_act_on_resource_logic(
"Authorization": "Bearer not_checked_when_auth_is_disabled",
"X-API-Key": "123456789",
}
resp = await default_client.post(
"/iam/can_act_on_resource", json=body, headers=headers
)
resp = await default_client.post("/iam/can_act_on_resource", json=body, headers=headers)
data = resp.json()
assert resp.status_code == 200
@ -414,9 +406,7 @@ async def test_get_permissions_success(default_client: AsyncClient):
assert permission["action"] == "read"
@pytest.mark.parametrize(
"query, expected_status", generate_query_and_status(["org_id"])
)
@pytest.mark.parametrize("query, expected_status", generate_query_and_status(["org_id"]))
@pytest.mark.anyio
async def test_get_permissions_status_checks(
default_client: AsyncClient, query: str, expected_status: int