diff --git a/tests/test_bot.py b/tests/test_bot.py index e221a69d..8480edf0 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -259,3 +259,14 @@ async def test_send_chat_action(bot: Bot, event_loop): result = await bot.send_chat_action(chat_id=chat.id, action=types.ChatActions.TYPING) assert isinstance(result, bool) assert result is True + + +@pytest.mark.asyncio +async def test_get_user_profile_photo(bot: Bot, event_loop): + """ getUserProfilePhotos method test """ + from .types.dataset import USER_PROFILE_PHOTOS, USER + user = types.User(**USER) + + async with FakeTelegram(message_dict=USER_PROFILE_PHOTOS, loop=event_loop): + result = await bot.get_user_profile_photos(user_id=user.id, offset=1, limit=1) + assert isinstance(result, types.UserProfilePhotos) diff --git a/tests/types/dataset.py b/tests/types/dataset.py index 87f49620..bca005c4 100644 --- a/tests/types/dataset.py +++ b/tests/types/dataset.py @@ -392,6 +392,12 @@ SHIPPING_QUERY = { "shipping_address": SHIPPING_ADDRESS } +USER_PROFILE_PHOTOS = { + "total_count": 1, "photos": [ + [PHOTO, PHOTO, PHOTO] + ] +} + UPDATE = { "update_id": 123456789, "message": MESSAGE