aboutsummaryrefslogtreecommitdiff
path: root/tests/http/test_basic.py
diff options
context:
space:
mode:
authorMax Nanis2026-02-19 20:11:41 -0500
committerMax Nanis2026-02-19 20:11:41 -0500
commit8b31678c6e44400967d4934cd9f3c6c6ac0da721 (patch)
tree41c5f4479c353a16da1a8b6fa9088abd084ea388 /tests/http/test_basic.py
parentf0f96f83c2630e890a2cbcab53f77fd4c37e1684 (diff)
downloadamt-jb-8b31678c6e44400967d4934cd9f3c6c6ac0da721.tar.gz
amt-jb-8b31678c6e44400967d4934cd9f3c6c6ac0da721.zip
Carer dir into project, some initial pytest, part of the flow tasks. License and Readme update
Diffstat (limited to 'tests/http/test_basic.py')
-rw-r--r--tests/http/test_basic.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/http/test_basic.py b/tests/http/test_basic.py
new file mode 100644
index 0000000..7b03a1e
--- /dev/null
+++ b/tests/http/test_basic.py
@@ -0,0 +1,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() == {}