diff options
Diffstat (limited to 'tests/http/test_work.py')
| -rw-r--r-- | tests/http/test_work.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/tests/http/test_work.py b/tests/http/test_work.py index 59b8830..c69118b 100644 --- a/tests/http/test_work.py +++ b/tests/http/test_work.py @@ -1,24 +1,24 @@ import pytest from httpx import AsyncClient -from jb.models.hit import Hit +class TestWork: -@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" + @pytest.mark.anyio + async def test_work( + self, + httpxclient: AsyncClient, + hit_record, + amt_assignment_id, + amt_worker_id, + ): + client = httpxclient + + params = { + "workerId": amt_worker_id, + "assignmentId": amt_assignment_id, + "hitId": hit_record.amt_hit_id, + } + res = await client.get("/work/", params=params) + + assert res.status_code == 200 |
