aboutsummaryrefslogtreecommitdiff
path: root/tests/http/test_work.py
diff options
context:
space:
mode:
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"