Compare commits
No commits in common. "f0eaff2073af95aa37d53ed905d107cd3287b46b" and "55a61d0df521accc6214a12472efeaa90190f84b" have entirely different histories.
f0eaff2073
...
55a61d0df5
2 changed files with 1 additions and 33 deletions
|
|
@ -134,7 +134,7 @@ async def get_user_orgs(user_model: user_model_claims_dependency):
|
||||||
"root_user_email": org.root_user_email,
|
"root_user_email": org.root_user_email,
|
||||||
"billing_contact": {
|
"billing_contact": {
|
||||||
"id": org.billing_contact_id,
|
"id": org.billing_contact_id,
|
||||||
"email": org.billing_contact_rel.email,
|
"email": org.owner_contact_rel.email,
|
||||||
},
|
},
|
||||||
"owner_contact": {
|
"owner_contact": {
|
||||||
"id": org.owner_contact_id,
|
"id": org.owner_contact_id,
|
||||||
|
|
|
||||||
|
|
@ -111,35 +111,3 @@ async def test_post_user_invitation_accept_status_checks(
|
||||||
|
|
||||||
if resp.status_code == 401:
|
if resp.status_code == 401:
|
||||||
assert resp.json()["detail"] == "Invalid JWS"
|
assert resp.json()["detail"] == "Invalid JWS"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.anyio
|
|
||||||
async def test_get_self_orgs_success(default_client: AsyncClient):
|
|
||||||
resp = await default_client.get("/user/self/orgs")
|
|
||||||
assert resp.status_code == 200
|
|
||||||
|
|
||||||
data = resp.json()
|
|
||||||
|
|
||||||
assert "organisations" in data
|
|
||||||
assert isinstance(data["organisations"], list)
|
|
||||||
assert len(data["organisations"]) > 0
|
|
||||||
|
|
||||||
org = data["organisations"][0]
|
|
||||||
assert org["organisation_id"] == 1
|
|
||||||
assert org["name"] == "Test Org"
|
|
||||||
assert org["status"] == "approved"
|
|
||||||
assert org["root_user_email"] == "admin@test.com"
|
|
||||||
assert "intake_questionnaire" in org
|
|
||||||
assert isinstance(org["intake_questionnaire"], dict)
|
|
||||||
|
|
||||||
assert isinstance(org["billing_contact"], dict)
|
|
||||||
assert org["billing_contact"]["email"] == "billing@test.org"
|
|
||||||
assert org["billing_contact"]["id"] == 1
|
|
||||||
|
|
||||||
assert isinstance(org["owner_contact"], dict)
|
|
||||||
assert org["owner_contact"]["email"] == "owner@test.org"
|
|
||||||
assert org["owner_contact"]["id"] == 2
|
|
||||||
|
|
||||||
assert isinstance(org["security_contact"], dict)
|
|
||||||
assert org["security_contact"]["email"] == "security@test.org"
|
|
||||||
assert org["security_contact"]["id"] == 3
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue