Hand-added votes: pad per-answer counts to the option count; test covers it
This commit is contained in:
+2
-1
@@ -168,7 +168,8 @@ def test_full_flow_and_anonymity(server):
|
||||
|
||||
assert admin(server, p, "POST", f"/questions/{qid}/close").status_code == 200
|
||||
q = admin(server, p, "GET", "").json()["questions"][0]
|
||||
assert q["results"] == {"counts": [1, 0], "blank": 1, "ballots": 2}
|
||||
assert q["results"] == {"counts": [1, 0], "blank": 1, "ballots": 2,
|
||||
"extra": {"counts": [0, 0], "blank": 0, "ballots": 0}}
|
||||
|
||||
r = await a.post(f"/api/v/{p['id']}/vote", json={"question_id": qid, "choices": [0]})
|
||||
assert r.status_code == 409 and r.json()["error"] == "not_open"
|
||||
|
||||
Reference in New Issue
Block a user