Improving test_pre_checkout_query

This commit is contained in:
Gabben 2020-05-17 17:05:30 +05:00
parent a6f83599c8
commit b04a14072e

View file

@ -12,7 +12,12 @@ class TestPreCheckoutQuery:
invoice_payload="payload", invoice_payload="payload",
) )
api_method = pre_checkout_query.answer(True) kwargs = dict(ok=True, error_message="foo")
api_method = pre_checkout_query.answer(**kwargs)
assert isinstance(api_method, AnswerPreCheckoutQuery) assert isinstance(api_method, AnswerPreCheckoutQuery)
assert api_method.pre_checkout_query_id == pre_checkout_query.id assert api_method.pre_checkout_query_id == pre_checkout_query.id
for key, value in kwargs.items():
assert getattr(api_method, key) == value