aboutsummaryrefslogtreecommitdiff
path: root/tests/http/test_work.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_work.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_work.py')
-rw-r--r--tests/http/test_work.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/http/test_work.py b/tests/http/test_work.py
new file mode 100644
index 0000000..59b8830
--- /dev/null
+++ b/tests/http/test_work.py
@@ -0,0 +1,24 @@
+import pytest
+from httpx import AsyncClient
+
+from jb.models.hit import Hit
+
+
+@pytest.mark.skip(reason="hits live api, need to look at this")
+async def test_work(
+ httpxclient: AsyncClient,
+ no_limit,
+ amt_worker_id,
+ amt_assignment_id,
+ hit_in_amt: Hit,
+):
+ client = httpxclient
+ params = {
+ "workerId": amt_worker_id,
+ "assignmentId": amt_assignment_id,
+ "hitId": hit_in_amt.amt_hit_id,
+ }
+ res = await client.get(f"/work/", params=params)
+ assert res.status_code == 200
+ # the response is an html page
+ assert res.headers["content-type"] == "text/html; charset=utf-8"