From 8b31678c6e44400967d4934cd9f3c6c6ac0da721 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Thu, 19 Feb 2026 20:11:41 -0500 Subject: Carer dir into project, some initial pytest, part of the flow tasks. License and Readme update --- tests/http/test_work.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/http/test_work.py (limited to 'tests/http/test_work.py') 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" -- cgit v1.2.3