mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 07:06:26 +01:00
parent
d0c27e2d46
commit
3545139dd7
1 changed files with 12 additions and 0 deletions
|
@ -89,6 +89,18 @@ class TestBot(object):
|
||||||
assert get_me_bot.last_name == bot.last_name
|
assert get_me_bot.last_name == bot.last_name
|
||||||
assert get_me_bot.name == bot.name
|
assert get_me_bot.name == bot.name
|
||||||
|
|
||||||
|
@flaky(3, 1)
|
||||||
|
@pytest.mark.timeout(10)
|
||||||
|
def test_to_dict(self, bot):
|
||||||
|
to_dict_bot = bot.to_dict()
|
||||||
|
|
||||||
|
assert isinstance(to_dict_bot, dict)
|
||||||
|
assert to_dict_bot["id"] == bot.id
|
||||||
|
assert to_dict_bot["username"] == bot.username
|
||||||
|
assert to_dict_bot["first_name"] == bot.first_name
|
||||||
|
if bot.last_name:
|
||||||
|
assert to_dict_bot["last_name"] == bot.last_name
|
||||||
|
|
||||||
@flaky(3, 1)
|
@flaky(3, 1)
|
||||||
@pytest.mark.timeout(10)
|
@pytest.mark.timeout(10)
|
||||||
def test_forward_message(self, bot, chat_id, message):
|
def test_forward_message(self, bot, chat_id, message):
|
||||||
|
|
Loading…
Reference in a new issue