aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.rst3
-rw-r--r--tests/test_polls.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 1a9f5f9..6e234d0 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -382,7 +382,8 @@ Poll dicts
382 'options': # The poll options as a list of dicts, each option with a title and a 382 'options': # The poll options as a list of dicts, each option with a title and a
383 # votes_count field. votes_count can be None if the poll creator has 383 # votes_count field. votes_count can be None if the poll creator has
384 # chosen to hide vote totals until the poll expires and it hasn't yet. 384 # chosen to hide vote totals until the poll expires and it hasn't yet.
385 'emojis': # List of emoji dicts for all emoji used in answer strings 385 'emojis': # List of emoji dicts for all emoji used in answer strings,
386 'own_votes': # The logged-in users votes, as a list of indices to the options.
386 } 387 }
387 388
388 389
diff --git a/tests/test_polls.py b/tests/test_polls.py
index ca7335d..2187d31 100644
--- a/tests/test_polls.py
+++ b/tests/test_polls.py
@@ -10,10 +10,12 @@ def test_polls(api, api2):
10 api.poll_vote(status_poll.poll, [1]) 10 api.poll_vote(status_poll.poll, [1])
11 poll2 = api.poll(poll) 11 poll2 = api.poll(poll)
12 assert poll2.votes_count == 1 12 assert poll2.votes_count == 1
13 assert poll2.own_votes == [1]
13 14
14 api.poll_vote(status_poll.poll, [0]) 15 api.poll_vote(status_poll.poll, [0])
15 poll3 = api.poll(poll) 16 poll3 = api.poll(poll)
16 assert poll3.votes_count == 2 17 assert poll3.votes_count == 2
18 assert poll3.own_votes == [1, 0]
17 19
18 api2.status_delete(status_poll) 20 api2.status_delete(status_poll)
19 21
Powered by cgit v1.2.3 (git 2.41.0)