mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +00:00
Add CallbackQuery.answer
This commit is contained in:
parent
8e54cce58e
commit
6bba2da814
4 changed files with 56 additions and 0 deletions
14
tests/test_api/test_types/test_callback_query.py
Normal file
14
tests/test_api/test_types/test_callback_query.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from aiogram.api.methods import AnswerCallbackQuery
|
||||
from aiogram.api.types import CallbackQuery, User
|
||||
|
||||
|
||||
class TestCallbackQuery:
|
||||
def test_answer_alias(self):
|
||||
callback_query = CallbackQuery(
|
||||
id="id", from_user=User(id=42, is_bot=False, first_name="name"), chat_instance="chat"
|
||||
)
|
||||
|
||||
api_method = callback_query.answer()
|
||||
|
||||
assert isinstance(api_method, AnswerCallbackQuery)
|
||||
assert api_method.callback_query_id == callback_query.id
|
||||
Loading…
Add table
Add a link
Reference in a new issue