blob: 7b03a1e7eab8e1cf91652e7884595899e0d4a314 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import pytest
from httpx import AsyncClient
@pytest.mark.anyio
async def test_base(httpxclient: AsyncClient):
client = httpxclient
res = await client.get("/")
# actually returns 404. old test expects 401. idk what is should be
print(res.text)
# assert res.status_code == 404
assert res.status_code == 200
@pytest.mark.anyio
async def test_static_file_alias(httpxclient: AsyncClient):
client = httpxclient
"""
These are here for site crawlers and stuff..
"""
for p in ["/robots.txt", "/sitemap.xml", "/favicon.ico"]:
res = await client.get(p)
assert res.status_code == 200, p
assert res.json() == {}
@pytest.mark.anyio
async def test_health(httpxclient: AsyncClient):
client = httpxclient
"""
These are here for site crawlers and stuff..
"""
res = await client.get("/health/")
assert res.status_code == 200
assert res.json() == {}
|