Add provider_data .

This commit is contained in:
eternnoir 2017-11-29 13:59:47 +08:00
parent 2493b200a4
commit c300195b49
2 changed files with 9 additions and 1 deletions

View File

@ -889,7 +889,7 @@ class TeleBot:
start_parameter, photo_url=None, photo_size=None, photo_width=None, photo_height=None,
need_name=None, need_phone_number=None, need_email=None, need_shipping_address=None,
is_flexible=None,
disable_notification=None, reply_to_message_id=None, reply_markup=None, provider_data=Noen):
disable_notification=None, reply_to_message_id=None, reply_markup=None, provider_data=None):
result = apihelper.send_invoice(self.token, chat_id, title, description, invoice_payload, provider_token,
currency, prices, start_parameter, photo_url, photo_size, photo_width,
photo_height,

View File

@ -410,3 +410,11 @@ class TestTeleBot:
tb = telebot.TeleBot(TOKEN)
ret_msg = tb.send_video_note(CHAT_ID, file_data)
assert ret_msg.message_id
def test_send_media_group(self):
tb = telebot.TeleBot(TOKEN)
img1 = 'https://i.imgur.com/CjXjcnU.png'
img2 = 'https://i.imgur.com/CjXjcnU.png'
medias = [types.InputMediaPhoto(img1, "View"), types.InputMediaPhoto(img2, "Dog")]
result = tb.send_media_group(CHAT_ID, medias)
assert len(result) == 2