mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
[3.x] Bot API 5.3 + Improvements (#618)
* Regenerate API * Update code * Fixed command filter for photos * Fix tests so they are able to run * Test new and renamed API methods * Reformat files * Fix outer_middleware resolution (#637) (#640) * Fix outer_middleware resolution (#637) * Reformat files * Reorder routers when resolve middlewares Co-authored-by: Alex Root Junior <jroot.junior@gmail.com> * Added possibility to use empty callback data factory filter * Rename KeyboardConstructor to KeyboardBuilder * Fixed type Co-authored-by: evgfilim1 <evgfilim1@yandex.ru>
This commit is contained in:
parent
4599913e18
commit
ac2b0bb198
69 changed files with 1223 additions and 206 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import pytest
|
||||
|
||||
from aiogram.methods import GetChatMember, Request
|
||||
from aiogram.types import ChatMember, User
|
||||
from aiogram.types import ChatMember, ChatMemberOwner, User
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
|
|
@ -11,7 +11,9 @@ class TestGetChatMember:
|
|||
prepare_result = bot.add_result_for(
|
||||
GetChatMember,
|
||||
ok=True,
|
||||
result=ChatMember(user=User(id=42, is_bot=False, first_name="User"), status="creator"),
|
||||
result=ChatMemberOwner(
|
||||
user=User(id=42, is_bot=False, first_name="User"), is_anonymous=False
|
||||
),
|
||||
)
|
||||
|
||||
response: ChatMember = await GetChatMember(chat_id=-42, user_id=42)
|
||||
|
|
@ -24,7 +26,9 @@ class TestGetChatMember:
|
|||
prepare_result = bot.add_result_for(
|
||||
GetChatMember,
|
||||
ok=True,
|
||||
result=ChatMember(user=User(id=42, is_bot=False, first_name="User"), status="creator"),
|
||||
result=ChatMemberOwner(
|
||||
user=User(id=42, is_bot=False, first_name="User"), is_anonymous=False
|
||||
),
|
||||
)
|
||||
|
||||
response: ChatMember = await bot.get_chat_member(chat_id=-42, user_id=42)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue