1
0
Fork 0
forked from sr2/cloud-api

ruff: config and initial run

This commit is contained in:
Chris Milne 2026-06-08 10:45:38 +01:00
parent bb4965ab07
commit 903b24d17d
13 changed files with 31 additions and 37 deletions

View file

@ -6,7 +6,7 @@ from httpx import AsyncClient
from src.organisation.models import Organisation, OrgUsers
from src.user.models import User
from .conftest import default_client, generate_query_and_status
from .conftest import generate_query_and_status
@pytest.mark.anyio
@ -151,7 +151,7 @@ async def test_get_org_users_success(default_client: AsyncClient):
assert resp.status_code == 200
assert "users" in data
assert type(data["users"]) == list
assert isinstance(data["users"], list)
assert len(data["users"]) == 1
assert data["users"][0] == "admin@test.com"
@ -181,7 +181,7 @@ async def test_post_org_user_success(default_client: AsyncClient, db_session):
assert resp.status_code == 200
assert "users" in data
assert type(data["users"]) == list
assert isinstance(data["users"], list)
assert "user@test.org" in data["users"]
@ -264,7 +264,7 @@ async def test_get_org_groups_success(default_client: AsyncClient):
assert resp.status_code == 200
assert "groups" in data
assert type(data["groups"]) == list
assert isinstance(data["groups"], list)
assert "Test Group" in data["groups"]
@ -379,7 +379,7 @@ async def test_patch_org_contact_success(default_client: AsyncClient, key: str,
],
)
@pytest.mark.anyio
async def test_patch_org_status_status_checks(default_client: AsyncClient, body: dict[str, str], expected_status: int):
async def test_patch_org_contact_status_checks(default_client: AsyncClient, body: dict[str, str], expected_status: int):
resp = await default_client.patch("/org/contact", json=body)
assert resp.status_code == expected_status