mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Bot API 6.7 (#1168)
* Added 6.7 features * Update after release * Added tests * Added changelog
This commit is contained in:
parent
aad2de4324
commit
1538bc2e2d
34 changed files with 754 additions and 51 deletions
11
tests/test_api/test_methods/test_get_my_name.py
Normal file
11
tests/test_api/test_methods/test_get_my_name.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from aiogram.methods import GetMyName
|
||||
from aiogram.types import BotDescription, BotName
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
class TestGetMyName:
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetMyName, ok=True, result=BotName(name="Test"))
|
||||
|
||||
response: BotName = await bot.get_my_name()
|
||||
assert response == prepare_result.result
|
||||
10
tests/test_api/test_methods/test_set_my_name.py
Normal file
10
tests/test_api/test_methods/test_set_my_name.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from aiogram.methods import SetMyName
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
class TestSetMyName:
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetMyName, ok=True, result=True)
|
||||
|
||||
response: bool = await bot.set_my_name()
|
||||
assert response == prepare_result.result
|
||||
|
|
@ -43,8 +43,8 @@ from aiogram.types import (
|
|||
Document,
|
||||
EncryptedCredentials,
|
||||
ForumTopicClosed,
|
||||
ForumTopicEdited,
|
||||
ForumTopicCreated,
|
||||
ForumTopicEdited,
|
||||
ForumTopicReopened,
|
||||
Game,
|
||||
InlineKeyboardButton,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue