mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added support of Bot API 6.2
This commit is contained in:
parent
4315ecf1a2
commit
bc88bf8571
64 changed files with 237 additions and 271 deletions
|
|
@ -0,0 +1,34 @@
|
|||
from typing import List
|
||||
|
||||
import pytest
|
||||
|
||||
from aiogram.methods import GetCustomEmojiStickers, Request
|
||||
from aiogram.types import Sticker
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
class TestGetCustomEmojiStickers:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetCustomEmojiStickers, ok=True, result=None)
|
||||
|
||||
response: List[Sticker] = await GetCustomEmojiStickers(
|
||||
custom_emoji_ids=...,
|
||||
)
|
||||
request: Request = bot.get_request()
|
||||
assert request.method == "getCustomEmojiStickers"
|
||||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetCustomEmojiStickers, ok=True, result=None)
|
||||
|
||||
response: List[Sticker] = await bot.get_custom_emoji_stickers(
|
||||
custom_emoji_ids=...,
|
||||
)
|
||||
request: Request = bot.get_request()
|
||||
assert request.method == "getCustomEmojiStickers"
|
||||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
|
@ -126,6 +126,7 @@ TEST_MESSAGE_STICKER = Message(
|
|||
height=42,
|
||||
is_animated=False,
|
||||
is_video=False,
|
||||
type="regular",
|
||||
),
|
||||
chat=Chat(id=42, type="private"),
|
||||
from_user=User(id=42, is_bot=False, first_name="Test"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue