Commit graph

463 commits

Author SHA1 Message Date
Jacob Bom
8df35fd53b Fix for crashes on 8.1 (#873)
* Make Commandhandler not crash on single char messages

* Bump release and update CHANGES.rst for 8.1.1

* No error on single / and test
2017-10-15 16:59:10 +02:00
Eldinnie
28680ac1d5 edited_updates also for channel_posts (#832) 2017-10-14 23:48:06 +03:00
Jannes Höke
ec9b16ac7b Fix command not recognized if it is directly followed by a newline (#869)
fixes #868
2017-10-14 21:04:02 +03:00
Eldinnie
bfad2fa1f3 support 3.4 API (#865) 2017-10-14 21:03:02 +03:00
Eldinnie
d75e0f6014 Stabilize Coverage (#846)
* test_error added

* ignore unstables for coverage
2017-09-25 20:58:10 +02:00
Eldinnie
dd20237f55 Enable appveyor (#823)
* modify tests and appveyor.yml

* modify test_meta

* Add pytest-cov to requirements

* appveyor.yaml adjustment

* another try

* oops

* skipping jobqueue tests on appveyor

appveyor is terrible at precise timings.

* adding reasons to skips

* modify test_official

* coverage trouble

* Make it look good

* appveyor.yml

* codecov flags

* oops

* update appveyor.yml

* shorten decorators

* removed redundant quotes
2017-09-14 17:54:00 +02:00
Eldinnie
4fe4eea893 only run coverage for relevant test (#818)
* fix test troubles

* another try

* testing travis build?

* trying pytestmark
2017-09-09 23:37:07 +02:00
Eldinnie
e13cd58773 Fix sticker tests (#807)
* Fix sticker tests

Added flaky, timeout and xfails to the stickerset bot method tests.

* Make sure the first stickersettest worked before modifying in test 2

* some mor changes to make the deletion more stable
2017-09-01 08:47:34 +02:00
Jannes Höke
1f5311b473 catch exceptions in error handlerfor errors that happen during polling (2) (#810)
* catch exceptions in error handlerfor errors that happen during polling

* add tests for error handlers that raise exceptions
2017-09-01 08:46:21 +02:00
Eldinnie
eae139d3e9 remove de_json() (#789)
* remove de_json()

* Remove or rename obsolete tests

* fixes according to rc
2017-09-01 08:45:22 +02:00
Jacob Bom
8cda3f7a71 Turn on branch coverage (#790)
* Run pre commit hook tests on all platforms TEMPORARILY

* Use os.system instead of subprocess.call

* Turn on branch coverage

* Let's try this then

* More testing!

* Update test_meta.py
2017-09-01 08:44:45 +02:00
Jacob Bom
d7929a8de4 Test UserProfilePhotos (#796) 2017-09-01 08:44:26 +02:00
Eldinnie
6cd0c14c02 Show what parameter/attribute is missing in test_offical (#808)
* Show what parameter/attribute is missing in test_offical

* Only run test_official on py3.6

Down from 3.5 and 3.6
2017-09-01 08:40:52 +02:00
Jeff
b6a0853896 Add Bot API 3.3 (#806)
* Bot API 3.3

* simpler helper methods (accept only custom names now)
attempt to fix circular import (not sure if its the correct way tho)
added helper methods into User object

* fix User objects in tests to contain is_bot required value

* fix User objects in tests to contain is_bot required value

* delete extra line that caused flake8 error

* fix swapped arguments
2017-09-01 08:40:05 +02:00
Noam Meltzer
16a49ec659 Remove DispatcherHandlerContinue + more unitests for dispatcher (#792)
The idea was nice, but it really complicated things for us and for the
user.
If a user wants to run more than one handler on an update, he can put
the handlers in different groups or he can have a single handler.
If a user wants to have multiple handlers in the same group which only
one of them should run on the update, he should use check_update().

Since we haven't released this code yet, there's no problem with
backward compatability.
2017-08-12 18:57:12 +03:00
Jacob Bom
5d7c6ad541 Switch to pytest + required fixes to code (#788)
Required fixes:
 - CallbackQuery is now comparable.
 - Message.effective_attachment, Message.photo,
   Message.new_chat_members, Message.new_chat_photo &
   Game.text_entitties semantic fixes - when they are not defined,
   return an empty list.
 - Docstring fix to Update class.
2017-08-12 00:58:41 +03:00
Noam Meltzer
915cd64140 Effective attachment (#766)
fixes #746
2017-08-08 00:25:19 +03:00
Ihor Polyakov
454ab050c0 Decrease number of requests in tests (#755) 2017-08-01 00:16:44 +03:00
Ihor Polyakov
6aacde189e Flow control ability in Dispatcher (#738)
fixes #666
2017-07-29 20:15:43 +03:00
Eldinnie
2ba7505eaf Fix TypeError exception in RegexHandler (#751)
fixes #750
2017-07-28 20:47:42 +03:00
Noam Meltzer
eef1238d60 Comment out unitest test_send_contact_with_contact
Caused too many "RetryAfter: Flood control exceeded" errors.

[ci skip]
2017-07-28 17:39:21 +03:00
Eldinnie
ae29620cd6 Remove duplicate test (#748) 2017-07-25 21:31:30 +03:00
Eldinnie
8d1d38cc4c send_* now accepts tg-objects (#742)
Fixes #731
2017-07-25 01:35:22 +03:00
Noam Meltzer
f0638df390 Disable webhook unitests
Telegram servers don't like the endless game of set/delete webhooks and
refusing our requests. We're better of without testing it.
2017-07-25 00:23:11 +03:00
Eldinnie
b3b94240a5 Docs update (#728)
Amazing new documentation.
2017-07-23 23:33:08 +03:00
Rahiel Kasim
19ce9e4512 Delete deprecated code (#693)
* remove Botan import from utils

* remove telegram.Emoji

* remove ReplyKeyboardHide

* remove edit_message argument of bot.set_game_score
2017-07-23 22:58:20 +03:00
Jelle Besseling
8320227b2a ConvesationHandler - check if a user exist before using it (#699)
Fixes #695
2017-07-23 22:29:52 +03:00
Ihor Polyakov
08d298eb60 TelegramObject.de_json became classmethod (#737)
Fixes #734
2017-07-23 22:14:38 +03:00
Jacob Bom
5a37af6f89 Bot api 3.2 (#732)
NOTE: Currently not testing StickerSet in terms of bot methods (interaction with telegrams servers) as there's no delete operations.
2017-07-22 14:34:51 +03:00
Jacob Bom
94ed4cb38d Bot api 3.1 (#698) + minor improvements
- Added all the new and shiny features from API 3.1.
 - Not API 3.1 changes:
   - Use future.utils.string_types for string isinstance checks.
   - Stall between retries of test_set_webhook_get_webhook_info() &
     test_delete_webhook().
2017-07-01 18:08:45 +03:00
Eldinnie
b4b0eb4686 Tests files from website (#687)
Use website for send from url tests instead of github.
2017-06-23 21:10:43 +03:00
Noam Meltzer
8703ae0b8d Merge pull request #683 from python-telegram-bot/no_hardcoded_fileids
No hardcoded fileids
2017-06-23 00:47:13 +03:00
Noam Meltzer
d216b83728 Merge pull request #685 from python-telegram-bot/cache-pip-ci
Cache pip for travis and appveyor + update to travis trusty container
2017-06-22 21:48:00 +03:00
Noam Meltzer
56949bcad6 Merge pull request #674 from python-telegram-bot/restructure-internal
Move a lot of files
2017-06-22 21:26:47 +03:00
Noam Meltzer
470ee86497 Merge pull request #677 from evgfilim1/new-filters
New filters for handling messages from specific chat/user id
2017-06-22 21:25:39 +03:00
Jacob Bom
5b9bb904c2 Skip "official" tests on pypy
inspect.signature() seems to return a string instead of an actual signature on pypy
2017-06-22 20:18:31 +02:00
Eldin
cedc38dcdf finalising
* Added telegram.jpg to gitignore since we're downloading it now
* moved download tests to the right tests to make test_file file_id free
2017-06-22 18:29:21 +02:00
Eldin
ac0793caa2 test_sticker modified
* cleanup assertions in test_video
* modify test_sticker to same standard as the others.
2017-06-22 18:04:19 +02:00
Eldin
28836b7735 stickerfile added 2017-06-22 17:45:06 +02:00
Eldin
4fad382f26 standardize assertions 2017-06-22 17:17:40 +02:00
Jacob Bom
512ca2643f Fix weird import in phototest 2017-06-22 15:40:43 +02:00
evgfilim1
ecfcc69cf9 Fixed tests 2017-06-22 15:20:11 +05:00
Noam Meltzer
4b3b0cb4cd Merge pull request #668 from python-telegram-bot/official-test
Add an "official test"
2017-06-21 23:14:10 +03:00
Eldin
85e52f1930 delete test file 2017-06-21 19:02:36 +02:00
Eldin
976ad1b987 new shorter audiofile 2017-06-21 19:01:20 +02:00
Eldin
1f9f3ae8a1 shorter mp3 file 2017-06-21 18:55:59 +02:00
Eldin
d2f89382a0 sending from web stuff
* Audiofile sent from web is shorter then from local
* web-photo's send more than two imagesizes
2017-06-21 18:46:50 +02:00
Eldin
b49431931a Reworked get_bot
It now decides wich bot to give depending on CI, and made ready or more bot's per version.
2017-06-21 18:25:04 +02:00
Eldin
fca64f5fc6 Move photo tests from test_bot to test_photo 2017-06-21 18:10:00 +02:00
Eldin
c92ebc4046 test_audio done
* Changed to new method of non-static file_id
* removed obsolete tests.
* changed some tests in all file
2017-06-21 17:59:35 +02:00