Notify moderators about service center applications
This commit is contained in:
@@ -14,11 +14,12 @@ async def test_license_plate_can_be_saved_and_edited(client, auth_headers) -> No
|
||||
updated = await client.patch(
|
||||
f"/api/cars/{car['id']}",
|
||||
headers=auth_headers,
|
||||
json={"plate_number": "34 나 7890"},
|
||||
json={"plate_number": "34 나 7890", "body_type": "SUV"},
|
||||
)
|
||||
|
||||
assert updated.status_code == 200
|
||||
assert updated.json()["plate_number"] == "34 나 7890"
|
||||
assert updated.json()["body_type"] == "SUV"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -312,3 +313,26 @@ async def test_admin_request_changes_keeps_application_visible_to_moderation(
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["verification_status"] == "needs_changes"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_service_center_application_is_visible_to_moderators(
|
||||
client, auth_headers, admin_auth_headers, internal_headers
|
||||
) -> None:
|
||||
center = (
|
||||
await client.post(
|
||||
"/api/service-centers",
|
||||
headers=auth_headers,
|
||||
json={"display_name": "Pending Review Service", "country": "KR"},
|
||||
)
|
||||
).json()
|
||||
await client.post(
|
||||
"/api/users",
|
||||
headers=internal_headers,
|
||||
json={"telegram_id": 9001, "platform_role": "moderator"},
|
||||
)
|
||||
|
||||
pending = await client.get("/api/admin/service-centers/pending", headers=admin_auth_headers)
|
||||
|
||||
assert pending.status_code == 200
|
||||
assert center["id"] in [item["id"] for item in pending.json()]
|
||||
|
||||
Reference in New Issue
Block a user