Added possibility to reply into webhook with files (#1120)

This commit is contained in:
Alex Root Junior 2023-02-12 02:00:42 +02:00 committed by GitHub
parent 84bc0e347b
commit 58868ec627
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 126 additions and 30 deletions

View file

@ -12,7 +12,7 @@ from aiogram import Bot
from aiogram.dispatcher.dispatcher import Dispatcher
from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler
from aiogram.dispatcher.router import Router
from aiogram.methods import GetMe, GetUpdates, SendMessage
from aiogram.methods import GetMe, GetUpdates, Request, SendMessage
from aiogram.types import (
CallbackQuery,
Chat,
@ -703,9 +703,9 @@ class TestDispatcher:
dispatcher.message.register(simple_message_handler)
response = await dispatcher.feed_webhook_update(bot, RAW_UPDATE, _timeout=0.3)
assert isinstance(response, dict)
assert response["method"] == "sendMessage"
assert response["text"] == "ok"
assert isinstance(response, Request)
assert response.method == "sendMessage"
assert response.data["text"] == "ok"
async def test_feed_webhook_update_slow_process(self, bot: MockedBot, recwarn):
warnings.simplefilter("always")