Reorder some stickset tests to hopefully make them pass

This commit is contained in:
Jasmin Bom 2019-02-09 18:21:12 +01:00
parent 66e43c5932
commit 27b757df32

View file

@ -243,6 +243,14 @@ class TestStickerSet(object):
assert sticker_set.contains_masks == self.contains_masks
assert sticker_set.stickers == self.stickers
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_bot_methods_1(self, bot, chat_id):
with open('tests/data/telegram_sticker.png', 'rb') as f:
file = bot.upload_sticker_file(95205500, f)
assert file
assert bot.add_sticker_to_set(chat_id, 'test_by_{0}'.format(bot.username), file.file_id, '😄')
def test_sticker_set_to_dict(self, sticker_set):
sticker_set_dict = sticker_set.to_dict()
@ -252,14 +260,6 @@ class TestStickerSet(object):
assert sticker_set_dict['contains_masks'] == sticker_set.contains_masks
assert sticker_set_dict['stickers'][0] == sticker_set.stickers[0].to_dict()
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_bot_methods_1(self, bot, chat_id, sticker_set):
with open('tests/data/telegram_sticker.png', 'rb') as f:
file = bot.upload_sticker_file(95205500, f)
assert file
assert bot.add_sticker_to_set(chat_id, sticker_set.name, file.file_id, '😄')
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_bot_methods_2(self, bot, sticker_set):