mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support of Bot API 6.5 (#1112)
* Added full support of Bot API 6.5 * Shut up, linters (Fixed errors) * Oops. Added lost files. * Fixed tests * Added changes description * Update description from docs * Fixed anchors * Update Butcher * Added danger zone to changelog * Type
This commit is contained in:
parent
3428924d63
commit
e59d4652bf
47 changed files with 1218 additions and 184 deletions
|
|
@ -9,6 +9,7 @@ class TestChatJoinRequest:
|
|||
chat_join_request = ChatJoinRequest(
|
||||
chat=Chat(id=-42, type="supergroup"),
|
||||
from_user=User(id=42, is_bot=False, first_name="Test"),
|
||||
user_chat_id=42,
|
||||
date=datetime.datetime.now(),
|
||||
)
|
||||
|
||||
|
|
@ -22,6 +23,7 @@ class TestChatJoinRequest:
|
|||
chat_join_request = ChatJoinRequest(
|
||||
chat=Chat(id=-42, type="supergroup"),
|
||||
from_user=User(id=42, is_bot=False, first_name="Test"),
|
||||
user_chat_id=42,
|
||||
date=datetime.datetime.now(),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -434,8 +434,9 @@ class TestDispatcher:
|
|||
Update(
|
||||
update_id=42,
|
||||
chat_join_request=ChatJoinRequest(
|
||||
chat=Chat(id=42, type="private"),
|
||||
chat=Chat(id=-42, type="private"),
|
||||
from_user=User(id=42, is_bot=False, first_name="Test"),
|
||||
user_chat_id=42,
|
||||
date=datetime.datetime.now(),
|
||||
),
|
||||
),
|
||||
|
|
@ -589,8 +590,7 @@ class TestDispatcher:
|
|||
"aiogram.dispatcher.dispatcher.Dispatcher.silent_call_request",
|
||||
new_callable=AsyncMock,
|
||||
) as mocked_silent_call_request:
|
||||
result = await dispatcher._process_update(bot=bot, update=Update(update_id=42))
|
||||
print(result)
|
||||
await dispatcher._process_update(bot=bot, update=Update(update_id=42))
|
||||
mocked_silent_call_request.assert_awaited()
|
||||
|
||||
async def test_process_update_exception(self, bot: MockedBot, caplog):
|
||||
|
|
|
|||
|
|
@ -315,7 +315,8 @@ class TestChatMemberUpdatedStatusFilter:
|
|||
update = {
|
||||
"user": user,
|
||||
"until_date": datetime.now(),
|
||||
"is_anonymous": False,
|
||||
"is_anonymous": True,
|
||||
"custom_title": True,
|
||||
"can_be_edited": True,
|
||||
"can_manage_chat": True,
|
||||
"can_delete_messages": True,
|
||||
|
|
@ -327,12 +328,17 @@ class TestChatMemberUpdatedStatusFilter:
|
|||
"can_post_messages": True,
|
||||
"can_edit_messages": True,
|
||||
"can_pin_messages": True,
|
||||
"can_manage_topics": True,
|
||||
"can_send_messages": True,
|
||||
"can_send_media_messages": True,
|
||||
"can_send_audios": True,
|
||||
"can_send_documents": True,
|
||||
"can_send_photos": True,
|
||||
"can_send_videos": True,
|
||||
"can_send_video_notes": True,
|
||||
"can_send_voice_notes": True,
|
||||
"can_send_polls": True,
|
||||
"can_send_other_messages": True,
|
||||
"can_add_web_page_previews": True,
|
||||
"can_manage_topics": True,
|
||||
}
|
||||
event = ChatMemberUpdated(
|
||||
chat=Chat(id=42, type="test"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue