mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +00:00
Add PreCheckoutQuery.answer
This commit is contained in:
parent
65002b9280
commit
cf12da0c4a
4 changed files with 47 additions and 0 deletions
18
tests/test_api/test_types/test_pre_checkout_query.py
Normal file
18
tests/test_api/test_types/test_pre_checkout_query.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from aiogram.api.methods import AnswerPreCheckoutQuery
|
||||
from aiogram.api.types import PreCheckoutQuery, User
|
||||
|
||||
|
||||
class TestPreCheckoutQuery:
|
||||
def test_answer_alias(self):
|
||||
pre_checkout_query = PreCheckoutQuery(
|
||||
id="id",
|
||||
from_user=User(id=42, is_bot=False, first_name="name"),
|
||||
currency="currency",
|
||||
total_amount=123,
|
||||
invoice_payload="payload",
|
||||
)
|
||||
|
||||
api_method = pre_checkout_query.answer(True)
|
||||
|
||||
assert isinstance(api_method, AnswerPreCheckoutQuery)
|
||||
assert api_method.pre_checkout_query_id == pre_checkout_query.id
|
||||
Loading…
Add table
Add a link
Reference in a new issue