mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
Add getUserProfilePhotos test
This commit is contained in:
parent
c0e4d480dd
commit
b95e977c12
2 changed files with 17 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue