Skip to content

Commit f029a6c

Browse files
Peibing GuPeibing Gu
authored andcommitted
added test on GET /v1/test/public with no auth → 200
1 parent 26f80cf commit f029a6c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""Smoke tests for public (unauthenticated) endpoints."""
2+
3+
import pytest
4+
from httpx import AsyncClient
5+
6+
7+
@pytest.mark.asyncio
8+
async def test_public_endpoint_returns_200(client_factory) -> None:
9+
client: AsyncClient = client_factory(None)
10+
async with client:
11+
response = await client.get("/v1/test/public")
12+
13+
assert response.status_code == 200
14+
body = response.json()
15+
assert body["requires_auth"] is False
16+
assert "message" in body

0 commit comments

Comments
 (0)