python-telegram-bot/tests
Jacob Bom faddb92395 Clean up Bot code a bit (#673)
* Clean up Bot code a bit

- Move decorators to module. It really wasn't clear how decorators inside classes work, and why they didn't have a self parameter, but still wasn't static. This also makes them effectively private without having to underscore them, which I think we should have done long time ago atm. Note that this might break backwards compatibility slightly (only if people are daft enough to have used the decorators themselves)
- Don't call _message_wrapper directly. Ever. Instead always use the message decorator, since it's what it's there for. Closes #627
- Don't use the message decorator if the method isn't supposed to return a message. The decorator could handle values like True (which is often the return value), but to someone reading the code, it seems like it's a message returning method even when it wasn't.
- Always document timeout and **kwargs
- Log all methods

* Add test to make sure timeout propagates properly despite decorators
2017-06-18 12:14:24 +02:00
..
data Fix video_note tests 2017-06-09 12:27:10 +03:00
__init__.py Fix travis 2015-09-07 16:33:00 -03:00
base.py Remove extra space from payment provider token 2017-05-20 18:55:21 +02:00
README.md fix typo's (#523) and comment out failing sticker test 2017-02-18 16:03:50 +01:00
test_animation.py Update copyright notice to include 2017 - missing files from another PR 2017-05-15 00:37:40 +03:00
test_audio.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_bot.py Clean up Bot code a bit (#673) 2017-06-18 12:14:24 +02:00
test_botan.py move botan to contrib 2016-05-28 09:12:10 +02:00
test_chat.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_chatmember.py Update copyright notice to include 2017 - missing files from another PR 2017-05-15 00:37:40 +03:00
test_choseninlineresult.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_constants.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_contact.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_conversationhandler.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_document.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_file.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_filters.py Fix typo in filter test 2017-06-03 02:05:26 +08:00
test_forcereply.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_game.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_helpers.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinekeyboardbutton.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinekeyboardmarkup.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequery.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultarticle.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultaudio.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultcachedaudio.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultcacheddocument.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultcachedgif.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultcachedmpeg4gif.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultcachedphoto.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultcachedsticker.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultcachedvideo.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultcachedvoice.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultcontact.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultdocument.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultgif.py Add mpeg4_duration and gif_duration to inline gif and mpeg4gif 2017-05-21 14:38:12 +02:00
test_inlinequeryresultlocation.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultmpeg4gif.py Add mpeg4_duration and gif_duration to inline gif and mpeg4gif 2017-05-21 14:38:12 +02:00
test_inlinequeryresultphoto.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultvenue.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultvideo.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inlinequeryresultvoice.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inputcontactmessagecontent.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inputlocationmessagecontent.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inputmessagecontent.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inputtextmessagecontent.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_inputvenuemessagecontent.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_invoice.py Add invoice test and there's no EUD currency, whoops 2017-05-20 18:51:31 +02:00
test_jobqueue.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_keyboardbutton.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_labeledprice.py Basic tests for payment stuff 2017-05-20 17:31:46 +02:00
test_location.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_message.py Fix text_markdown and text_html (#623) 2017-05-21 14:00:07 +02:00
test_messageentity.py MessageEntity != Sticker :P 2017-05-20 17:31:46 +02:00
test_messagequeue.py Introduce MessageQueue (#537) 2017-03-15 17:35:33 +01:00
test_orderinfo.py Basic tests for payment stuff 2017-05-20 17:31:46 +02:00
test_parsemode.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_photo.py unittest sending non standard jpg photo with bytesio stream 2017-05-29 09:38:02 +02:00
test_precheckoutquery.py fix tests for pycharm windows 2017-06-09 17:44:43 +03:00
test_replykeyboardmarkup.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_replykeyboardremove.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_replymarkup.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_shippingaddress.py Basic tests for payment stuff 2017-05-20 17:31:46 +02:00
test_shippingoption.py fix tests for pycharm windows 2017-06-09 17:44:43 +03:00
test_shippingquery.py fix tests for pycharm windows 2017-06-09 17:44:43 +03:00
test_sticker.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_successfulpayment.py Add invoice test and there's no EUD currency, whoops 2017-05-20 18:51:31 +02:00
test_update.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_updater.py Rename shortcut functions to snake_case (#661) 2017-06-14 00:07:03 +02:00
test_user.py add support for User.language_code (#624) 2017-05-21 14:00:53 +02:00
test_venue.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_video.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00
test_videonote.py Fix video_note tests 2017-06-09 12:27:10 +03:00
test_voice.py Update copyright notice to include 2017 2017-05-15 00:36:49 +03:00

tests

Some tests fail because of weird behaviour of the Telegram API. We comment these out and mark them with a TODO comment.