blob: 59b883004eb22eae5e94a7477fcae9d06267a7c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"
|