Fix user profile photo unitests (#967)

Telegram changed something again.
This commit is contained in:
Eldinnie 2018-01-09 16:56:43 +01:00 committed by Noam Meltzer
parent eb67c039f1
commit 820f4e1d59

View file

@ -188,14 +188,14 @@ class TestBot(object):
chat_id = 12173560 # hardcoded Leandro's chat_id
user_profile_photos = bot.get_user_profile_photos(chat_id)
assert user_profile_photos.photos[0][0].file_size == 12421
assert user_profile_photos.photos[0][0].file_size == 9999
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_get_one_user_profile_photo(self, bot):
chat_id = 12173560 # hardcoded Leandro's chat_id
user_profile_photos = bot.get_user_profile_photos(chat_id, offset=0, limit=1)
assert user_profile_photos.photos[0][0].file_size == 12421
assert user_profile_photos.photos[0][0].file_size == 9999
# get_file is tested multiple times in the test_*media* modules.