mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-03 09:49:21 +01:00
parent
3d4e0500bf
commit
5c8470e552
3 changed files with 3 additions and 1 deletions
|
@ -22,6 +22,7 @@ The following wonderful people contributed directly or indirectly to this projec
|
||||||
- `bimmlerd <https://github.com/bimmlerd>`_
|
- `bimmlerd <https://github.com/bimmlerd>`_
|
||||||
- `d-qoi <https://github.com/d-qoi>`_
|
- `d-qoi <https://github.com/d-qoi>`_
|
||||||
- `daimajia <https://github.com/daimajia>`_
|
- `daimajia <https://github.com/daimajia>`_
|
||||||
|
- `Daniel Reed <https://github.com/nmlorg>`_
|
||||||
- `Eli Gao <https://github.com/eligao>`_
|
- `Eli Gao <https://github.com/eligao>`_
|
||||||
- `ErgoZ Riftbit Vaper <https://github.com/ergoz>`_
|
- `ErgoZ Riftbit Vaper <https://github.com/ergoz>`_
|
||||||
- `Eugene Lisitsky <https://github.com/lisitsky>`_
|
- `Eugene Lisitsky <https://github.com/lisitsky>`_
|
||||||
|
|
|
@ -87,7 +87,7 @@ class PreCheckoutQuery(TelegramObject):
|
||||||
data['from_user'] = User.de_json(data.pop('from'), bot)
|
data['from_user'] = User.de_json(data.pop('from'), bot)
|
||||||
data['order_info'] = OrderInfo.de_json(data.get('order_info'), bot)
|
data['order_info'] = OrderInfo.de_json(data.get('order_info'), bot)
|
||||||
|
|
||||||
return cls(**data)
|
return cls(bot=bot, **data)
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
data = super(PreCheckoutQuery, self).to_dict()
|
data = super(PreCheckoutQuery, self).to_dict()
|
||||||
|
|
|
@ -55,6 +55,7 @@ class TestPreCheckoutQuery(object):
|
||||||
}
|
}
|
||||||
pre_checkout_query = PreCheckoutQuery.de_json(json_dict, bot)
|
pre_checkout_query = PreCheckoutQuery.de_json(json_dict, bot)
|
||||||
|
|
||||||
|
assert pre_checkout_query.bot is bot
|
||||||
assert pre_checkout_query.id == self.id
|
assert pre_checkout_query.id == self.id
|
||||||
assert pre_checkout_query.invoice_payload == self.invoice_payload
|
assert pre_checkout_query.invoice_payload == self.invoice_payload
|
||||||
assert pre_checkout_query.shipping_option_id == self.shipping_option_id
|
assert pre_checkout_query.shipping_option_id == self.shipping_option_id
|
||||||
|
|
Loading…
Reference in a new issue