Jacob Bom
c2b8c4bf95
Fix regexGroupHandlerCallbackQuery test
2016-10-03 21:29:30 +02:00
Michael Elovskikh
46657afa95
Start additional threads only when necessary ( #415 )
...
* Start all additional threads only when necessary.
* Deprecate prevent_autostart in the c'tor of JobQueue.
2016-09-27 10:21:35 +03:00
Jannes Höke
5116a77221
Class methods ( #362 )
...
* bot.py: add create_references method
* create bot reference in webhook handler, use create_references on new updates
* message.py: implement reply_text
* echobot2.py: use Message.reply_text
* fix create_references in webhook handler
* add some more instance methods
* Chat.kick_member and unban_member
* bot.py: Create bot references in outgoing messages
* add tests for everything testable
* test_updater.py: add create_references method to MockBot
* remove Bot.create_references and refactor TelegramObject.de_json to take the additional parameter bot
* List bot as named kwarg where used
* file.py: Use Bot.request property instead of Bot._request attr
2016-09-20 06:36:55 +02:00
Noam Meltzer
e4a132c0e4
Reusable dispatcher ( #402 )
...
* Create a Request class which maintains its own connection pool
* When creating a Bot instance a new Request instance will be created if one wasn't supplied.
* Updater is responsible for creating a Request instance if a Bot instance wasn't provided.
* Dispatcher: add method to run async functions without decorator
* Dispatcher can now run as a singleton (allowing run_async decorator to work) as it always did and as multiple instances (where run_async decorator will raise RuntimeError)
2016-09-06 16:38:07 +03:00
Rahiel Kasim
da87d4ba78
fix yapf
2016-08-26 11:17:05 +02:00
Rahiel Kasim
00bba73673
drop Python 2.6 support ( closes #245 ) ( #386 )
...
* drop Python 2.6 support (closes #245 )
* fix NullHandler import
* README: explicitly mention Py3 and PyPy compatibility
2016-08-20 22:01:07 +02:00
Jannes Höke
555e36ee80
tests
2016-08-06 14:47:45 +02:00
Jannes Höke
c4a8ee5175
Merge branch 'master' into jobqueue-rework
...
Conflicts:
tests/test_jobqueue.py
2016-06-20 05:32:15 +02:00
Noam Meltzer
bc77c845ea
test_updater: make sure that conpool is stopped before setting updater
...
even for the first unitest, it might come after another unitests from
another file which had already init the conpool.
2016-06-18 09:53:08 +03:00
Noam Meltzer
a814e9de6b
make sure to stop conpool between sensitive unitests
2016-06-18 00:50:44 +03:00
Noam Meltzer
d37b6d6735
make sure to stop Updater after the test_createBot is over
2016-06-18 00:01:36 +03:00
Jannes Höke
de2d732135
Merge branch 'master' into jobqueue-rework
...
Conflicts:
README.rst
telegram/ext/commandhandler.py
telegram/ext/messagehandler.py
2016-05-31 15:34:36 +02:00
Jannes Höke
a0bb5730c6
add allow_edited parameter to MessageHandler and CommandHandler
2016-05-27 11:07:06 +02:00
Jannes Höke
bb165b6acf
add pass_job_queue parameter to all handler classes
2016-05-26 14:39:11 +02:00
Leandro Toledo
880746baed
Column width to 90 #259
2016-05-14 21:52:35 -03:00
Leandro Toledo
8ad1f330ea
First run of yapf for tests/* #259
2016-05-14 21:39:11 -03:00
Jannes Höke
6ec81dd552
move cleaning updates to bootstrapping phase ( #282 )
2016-05-11 00:58:55 +03:00
Jannes Höke
7f463131aa
re-order imports
2016-04-27 00:28:21 +02:00
Leandro Toledo
35f6de326b
Add InlineKeyboardButtonTest and reformatting.
2016-04-26 18:23:15 -03:00
leandrotoledo
1f29093027
Merge branch 'unittest-bot2.0' of https://github.com/python-telegram-bot/python-telegram-bot into unittest-bot2.0
2016-04-26 14:17:59 -03:00
Noam Meltzer
3f28633e79
MessageHandler / filters: refactor
...
filters are now functions instead of enum like objects.
their definitions were moved to messagehandler.py
2016-04-26 17:47:37 +03:00
Leandro Toledo
ca1fff25f7
Some code reformat and minor fixes
2016-04-23 23:11:25 -03:00
Jannes Höke
9bf5da5ed3
add test for callback query handler
2016-04-21 13:07:44 +02:00
Jannes Höke
de5619f3ca
tests
2016-04-18 18:50:49 +02:00
kiddick
a9b305edd0
Fix class declaration according to consistency. ( #235 )
2016-04-15 17:20:37 +03:00
Jannes Höke
6db377d56d
Only set webhook if using SSL and also send certificate
2016-03-23 10:11:10 +01:00
leandrotoledo
da193711b1
Add legacy imports test to Dispatcher and JobQueue
2016-03-22 11:12:47 -03:00
Jannes Höke
63a83d4cc2
fix imports of updatequeue
2016-03-22 02:48:56 +01:00
Noam Meltzer
2939885c5b
test_updater: import Updater from telegram.ext
2016-03-15 22:08:06 +02:00
Noam Meltzer
f07f33e160
updater: unitests for _set_webhook
2016-03-15 22:02:34 +02:00
Rahiel Kasim
98112d3987
move Updater and friends to ext submodule
2016-03-14 14:50:12 +01:00
Noam Meltzer
a0a040a9c2
updater: allow cleaning updates from Telegram servers before start
2016-03-01 22:12:12 +02:00
Jannes Höke
4aca4d1d1f
Merge pull request #187 from python-telegram-bot/flaky-tests
...
Flaky tests
2016-02-28 01:02:11 +01:00
Noam Meltzer
d5b35e7e1d
unitests: remove docstrings & prints - not needed with nosetests
2016-02-24 00:45:49 +02:00
Jannes Höke
e2cc8db992
Merge branch 'master' into inlinebots
2016-02-20 11:17:34 +01:00
Noam Meltzer
7d39e1bdef
updater: more unitests for webookhandler
2016-02-19 18:00:57 +02:00
Jannes Höke
142cc6e6ad
add test for dispatching inline queries/results
2016-01-29 23:54:49 +01:00
Juan Madurga
a6650de93d
Add context parameter to dispatcher. Handlers now can updates with a context data if required
2016-01-20 19:56:41 +01:00
Jannes Höke
aa8966832b
release 3.2 and update copyright notice to 2015-2016
2016-01-05 14:12:03 +01:00
Noam Meltzer
5d168bd479
improve unitest coverage
2016-01-04 00:34:39 +02:00
Noam Meltzer
7734c1d6a6
fix unitests to work with new token validator
2016-01-04 00:32:13 +02:00
Jannes Höke
ea7c54ba07
Release v3.1.1, change author email everywhere
2015-12-21 21:18:53 +01:00
Jannes Höke
3c7b037eaa
add additional arguments 'groups' and 'groupdict' for regex handlers
2015-12-21 20:25:31 +01:00
Jannes Höke
c15a1bc151
fix for #123
2015-12-21 19:36:17 +01:00
Jannes Höke
6e158042e1
API updates Oct and Nov
2015-12-16 15:31:02 +01:00
Jannes Höke
56ab40d94f
increase time in test multiple messages
2015-12-01 21:58:39 +01:00
Gerd Augsburg
809fe4b74f
Updated tests for start_webhook
2015-12-01 14:48:55 +01:00
Jannes Höke
e60694a8cc
update test_webhook and add test_webhook_no_ssl
2015-11-30 23:00:56 +01:00
Jannes Höke
628a4c4eac
final renaming of files and flake8
2015-11-24 21:06:55 +01:00