Jacob Bom
305ff93018
set_game_score might return True
2016-10-16 12:41:12 +02:00
Noam Meltzer
53a574bbbb
Improve unitests coverage
2016-10-13 22:52:53 +03:00
Jacob Bom
04feeeff55
Update test cases
...
Needs proper animation file_id and size.
Also assertEqual can't test if two objects have the same data, so we just check the file_id instead.
2016-10-12 20:30:34 +02:00
Patrick Hofmann
8dc10fc7b2
fixes broken test cases with PhotoSize, Game and Animation classes ( #435 )
...
* fixes broken test with PhotoSize, Game and Animation
However:
testSendGame and test_set_game_score both produces *BadRequest: u'Wrong file identifier/HTTP URL specified'*.
* fixes test_set_game_score
* adds to_dict method to Game to prevent extra collection type checks in base.TelegramObject
2016-10-10 11:44:40 +02:00
Jacob Bom
7ad92dcc65
Add test for set_game_score
2016-10-09 12:39:05 +02:00
Jacob Bom
d1ddfaddf0
Add tests for Game, Animation and sendGame.
...
Still need setGameScore (I'm thinking we can set it to the ever increasing
envvar 'TRAVIS_BUILD_NUMBER') and getGameHighScores.
The tests currently don't work... Since I don't really understand how
PhotoSize works... Please halp :P
2016-10-07 23:57:10 +02:00
Noam Meltzer
bfb4c63d60
add unitest for getWebhookInfo
2016-10-06 00:11:28 +03:00
Jacob Bom
f34c09dd72
Fix image sizes in tests.
2016-09-14 19:58:30 +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
Noam Meltzer
b040568b07
test_bot: fix for urllib3 compatibility
2016-05-30 01:05:19 +03:00
Leandro Toledo
9a13de4a96
Merge remote-tracking branch 'origin/master' into bot2.1
...
Conflicts:
telegram/bot.py
tests/test_bot.py
2016-05-26 16:15:50 -03:00
Noam Meltzer
561f1c3f02
bot: validate token does not contain white spaces ( #306 )
...
in addition move validation code from validate.py into bot.py and delete
the former file
2016-05-26 22:09:14 +03:00
Leandro Toledo
663fa0013d
merge master
2016-05-25 22:09:18 -03:00
Leandro Toledo
1e398821a0
Introducing telegram.error.BadRequest and testLeaveChat testcase #302
2016-05-25 21:15:17 -03:00
Rahiel Kasim
386b91f708
refactor testing if user is bot
2016-05-25 09:41:48 +02:00
Rahiel Kasim
76b9a7d328
add tests for Bot.getChat*
2016-05-25 01:31:10 +02:00
Leandro Toledo
046e69b1c1
Commenting test for token with newline
2016-05-23 22:02:15 -03:00
Leandro Toledo
0b2fd120d8
Due kwargs I had to change the factory class in favor of InputLocationMessageContent #302
2016-05-23 21:09:07 -03:00
Leandro Toledo
af89cbecf3
Add test for unstripped tokens [ci skip]
2016-05-22 18:22:22 -03:00
leandrotoledo
eb303903ef
Fix travis
2016-05-22 12:55:48 -03:00
Jannes Höke
f5847be8ca
update file size from 684 to 685
2016-05-17 10:19:00 +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
d940afa718
merge master into cr4.0
2016-04-29 18:37:41 +02:00
Noam Meltzer
e160355190
remove unused imports, use future for urllib imports
2016-04-28 01:41:32 +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
Leandro Toledo
ca1fff25f7
Some code reformat and minor fixes
2016-04-23 23:11:25 -03:00
leandrotoledo
37e48b4707
Fixing BufferedReader test #248
2016-04-23 09:23:03 -03:00
leandrotoledo
252abb138d
Using hasattr instead isinstance for file check #119
2016-04-22 21:51:00 -03:00
Leandro Toledo
0669c72fe3
Fixing little princes Python 2.6 string format arg #232
2016-04-21 12:18:51 -03:00
Leandro Toledo
bb36c725af
More refactoring and docstrings #232
2016-04-21 09:21:12 -03:00
Aydar Biktimirov
0600b2634e
added tests for disable_notification parameter
2016-03-11 09:37:43 +03:00
Noam Meltzer
d5b35e7e1d
unitests: remove docstrings & prints - not needed with nosetests
2016-02-24 00:45:49 +02:00
Noam Meltzer
e0cf0abb1b
flaky tests: try up to 3 times, need to succeed once
2016-02-22 01:52:31 +02:00
Noam Meltzer
ec13a36bdd
unitests: use home brewed timeout for tests
2016-02-22 01:38:26 +02:00
Jannes Höke
d05fa1275a
use timed tests and flaky
2016-02-21 12:52:47 +01:00
Noam Meltzer
d4beb94059
Add specific exceptions types for important errors
...
maintain backward compatibility with the 'old' exception by inherting
from TelegramError and using the same message
2016-02-06 18:48:55 +02: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
1c8bb21790
fix python 2.6 unitests which with the backport package unittest2
2016-01-04 00:32:17 +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
leandrotoledo
8f3fe123e3
Fix travis
2015-11-13 10:53:31 -02:00
Leandro Toledo
354bfcad79
legacy tests now run using BaseTest
2015-09-10 20:06:27 -03:00
leandrotoledo
36dc1633f5
Move old tests to legacy dir until get new ones written
2015-09-07 15:54:50 -03:00
leandrotoledo
79cdb6cafe
Adding test to check if thumbs are PhotoSize instances
2015-09-04 18:58:48 -03:00
Leandro Toledo
a86fc6c2ac
Improving the design of existing Telegram classes
2015-08-28 17:45:44 -03:00
Leandro Toledo
1c4595123c
Add improvements to tests
2015-08-28 13:28:58 -03:00
Leandro Toledo
6837bef9bb
Fix tests for Py2.6
2015-08-28 13:07:12 -03:00
Leandro Toledo
0f924508f7
Fix tests and minor changes
2015-08-28 13:02:02 -03:00
leandrotoledo
d03a394075
Refactoring, improving the design of existing message class and adding docstrings
2015-08-21 14:49:07 -03:00
Leandro Toledo
6e2881b31b
Adding support for Voice object and sendVoice method #39
2015-08-17 11:34:42 -03:00
Leandro Toledo
686aecb914
Fix tests for Python 3
2015-08-17 10:01:17 -03:00
Leandro Toledo
56f6845969
Adding is_json tests and fixes json serialization when a forwared message #38
2015-08-17 09:56:51 -03:00
Leandro Toledo
5dc1e4cac1
Use imghdr instead re to match image headers. Fixes #37
2015-08-15 15:00:28 -03:00
Leandro Toledo
fda1843593
Remove import pdb
2015-08-14 15:48:33 -03:00
Leandro Toledo
9b6ccaf94b
Convert unix timestamp from date and forward_date in messages to date object #35
2015-08-14 15:47:31 -03:00
Leandro Toledo
ecdf32b5f6
Apply new Telegram Bot API changes #32
2015-08-11 17:32:06 -03:00
Leandro Toledo
163b27b7dd
fix license header
2015-08-11 16:58:17 -03:00
Leandro Toledo
59b247af94
Moving from GPLv2 to LGPLv3
2015-08-10 13:57:31 -03:00
Leandro Toledo
09ffd28df5
Update tests and logging
2015-08-09 09:59:41 -03:00
leandrotoledo
cad325c874
Adding logging
2015-07-20 08:50:30 -03:00
leandrotoledo
23b99690a1
I gave up, no support for Python 3.2 atm.
2015-07-15 11:01:11 -03:00
leandrotoledo
da6b7d496e
Fix test for Python 3.2
2015-07-15 10:55:52 -03:00
leandrotoledo
048fa23fd6
Merge branch 'master' of https://github.com/leandrotoledo/python-telegram-bot
2015-07-15 10:43:31 -03:00
leandrotoledo
92c3f48cda
Removing redundant parentheses, Python3 support, user.name property
2015-07-15 10:05:31 -03:00
leandrotoledo
d8912f5290
move isFileRequest to InputFile as @staticmethod, new tests written, README updated
2015-07-14 05:25:44 -03:00
Leandro Toledo
4a2c09e0cf
Releasing 1.8
2015-07-12 10:37:33 -03:00
Leandro Toledo
20b856a05f
Update test to support UTF8 text messages
2015-07-12 10:31:18 -03:00
Leandro Toledo
59d55df99e
Fixes crash when username is not defined on chat
2015-07-11 10:01:07 -03:00
Leandro Toledo
8ab910bd62
Adding URL support to send files
2015-07-10 19:46:15 -03:00
Leandro Toledo
5c6d233179
Fixes unicode erros when sending files
2015-07-10 16:50:33 -03:00
Leandro Toledo
8f8b220bff
Get rid of requests requirement, adding sendVideo file test
2015-07-10 13:43:35 -03:00
Leandro Toledo
b90b608fb1
Add to_json method to classes
2015-07-09 11:40:44 -03:00
Leandro Toledo
0214910741
Adding ReplyMarkup, ForceReply, renaming methods and minor fixes
2015-07-08 21:15:46 -03:00
Leandro Toledo
b39b6241b5
Updating README and minor fixes
2015-07-08 17:58:50 -03:00
Leandro Toledo
0b19099eea
Adding getUserProfilePhotos
2015-07-08 10:10:08 -03:00
Leandro Toledo
c20d6465fc
Adding sendChatAction, its tests and minor fixes
2015-07-08 09:55:06 -03:00
Leandro Toledo
86c1f68419
Adding sendLocation, its tests and minor fixes
2015-07-08 09:37:25 -03:00
Leandro Toledo
5963649c9a
Adding sendVideo and minor fixes
2015-07-08 09:17:18 -03:00
Leandro Toledo
635fae04e6
Adding Sticker and its tests
2015-07-07 23:52:12 -03:00
Leandro Toledo
368fe234f3
Adding Document and minor fixes
2015-07-07 21:12:51 -03:00
Leandro Toledo
c4cfcaecec
Adding PhotoSize and Audio models
2015-07-07 20:52:57 -03:00
Leandro Toledo
0b0bc3d550
Adding sendAudio method
2015-07-07 20:10:43 -03:00
Leandro Toledo
5e2f60ed7d
Adding sendPhoto method by file_id
2015-07-07 19:06:17 -03:00
Leandro Toledo
f7a15306a8
Adding sendPhoto method
2015-07-07 18:46:32 -03:00
Leandro Toledo
1b97d99357
Adding tests
2015-07-07 17:33:59 -03:00
Leandro Toledo
8c3ed7c629
Adding tests
2015-07-07 17:04:42 -03:00