Update tests

This commit is contained in:
Alex Root Junior 2020-01-25 18:26:30 +02:00
parent e80ab3d3c0
commit 4caa8faab8
6 changed files with 59 additions and 2 deletions

View file

@ -170,6 +170,10 @@ class TestText:
question="Question?",
options=[PollOption(text="A", voter_count=0)],
is_closed=False,
is_anonymous=False,
type="regular",
allows_multiple_answers=False,
total_voter_count=0,
),
chat=Chat(id=42, type="private"),
from_user=User(id=42, is_bot=False, first_name="Test"),
@ -209,6 +213,10 @@ class TestText:
question="Question",
options=[PollOption(text="A", voter_count=0)],
is_closed=False,
is_anonymous=False,
type="regular",
allows_multiple_answers=False,
total_voter_count=0,
),
True,
],
@ -221,6 +229,11 @@ class TestText:
question="Another question",
options=[PollOption(text="A", voter_count=0)],
is_closed=False,
is_anonymous=False,
type="quiz",
allows_multiple_answers=False,
total_voter_count=0,
correct_option_id=0,
),
True,
],

View file

@ -22,6 +22,11 @@ class TestShippingQueryHandler:
question="Q?",
options=[PollOption(text="A1", voter_count=1)],
is_closed=True,
is_anonymous=False,
type="quiz",
allows_multiple_answers=False,
total_voter_count=0,
correct_option_id=0,
)
class MyHandler(PollHandler):

View file

@ -263,6 +263,11 @@ class TestRouter:
PollOption(text="A2", voter_count=3),
],
is_closed=False,
is_anonymous=False,
type="quiz",
allows_multiple_answers=False,
total_voter_count=0,
correct_option_id=1,
),
),
False,
@ -319,6 +324,11 @@ class TestRouter:
PollOption(text="A2", voter_count=3),
],
is_closed=False,
is_anonymous=False,
type="quiz",
allows_multiple_answers=False,
total_voter_count=0,
correct_option_id=0,
),
)
)