Trial runs itself: first enrolled phone opens a sample vote; split screen fits
This commit is contained in:
@@ -678,6 +678,13 @@ def test_trial_enrolls_then_expires(server):
|
||||
async def run():
|
||||
async with projector(server, p) as next_token:
|
||||
c = await enroll(server, p, next_token)
|
||||
# nobody can push a question on a trial, the first phone in opens the sample one
|
||||
me = (await c.get(f"/api/v/{p['id']}/me")).json()
|
||||
q = next(q for q in me["questions"] if q["state"] == "open")
|
||||
assert me["vote_scans"] == 3
|
||||
fresh = [await next_token() for _ in range(3)]
|
||||
r = await c.post(f"/api/v/{p['id']}/vote", json={"question_id": q["id"], "choices": [0], "presence": fresh})
|
||||
assert r.status_code == 200, r.text
|
||||
await c.aclose()
|
||||
|
||||
asyncio.run(run())
|
||||
|
||||
Reference in New Issue
Block a user