mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +00:00
Add InlineQuery.answer
This commit is contained in:
parent
6bba2da814
commit
65002b9280
4 changed files with 67 additions and 1 deletions
17
tests/test_api/test_types/test_inline_query.py
Normal file
17
tests/test_api/test_types/test_inline_query.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from aiogram.api.methods import AnswerInlineQuery
|
||||
from aiogram.api.types import InlineQuery, User
|
||||
|
||||
|
||||
class TestInlineQuery:
|
||||
def test_answer_alias(self):
|
||||
inline_query = InlineQuery(
|
||||
id="id",
|
||||
from_user=User(id=42, is_bot=False, first_name="name"),
|
||||
query="query",
|
||||
offset="",
|
||||
)
|
||||
|
||||
api_method = inline_query.answer([])
|
||||
|
||||
assert isinstance(api_method, AnswerInlineQuery)
|
||||
assert api_method.inline_query_id == inline_query.id
|
||||
Loading…
Add table
Add a link
Reference in a new issue