Commit graph

35 commits

Author SHA1 Message Date
Noam Meltzer
38d6f4d9f2
Inputfile encode filenames (#1086)
* Unitest to recreate issue #1083

* InputFile: Encode unicode filenames

Fixes #1083
2018-04-25 23:13:00 +03:00
Eldinnie
a9a503b9c3 Increase timeouts on creation of fixtures in tests (#1015) 2018-02-22 15:13:57 +02:00
Jacob Bom
ebcc40ae92 More instance methods (#963)
* Bot.get_file now allows passing a file in addition to file_id

* Add .get_file() to Audio, Document, PhotoSize, Sticker, Video, VideoNote and Voice

* Add .send_*() methods to User and Chat
2018-02-18 17:49:52 +02:00
Jannik
c152d6583e Support v3.6 API (#1006)
* Added support for new field `telegram.Message.connected_message`

* Added support for new field `telegram.Message.connected_message`

* Added support for parse_mode in captions

* Added parse_mode parameter for captions in InlineQueryResult*

* Added supports_streaming parameter in telegram.Bot.send_video and telegram.InputMediaVideo
Fixed Docstrings for parse_mode in captions

* pypy3.5 unitests are now running with a new version due internal errors on travis.

closes #1005
2018-02-18 17:11:04 +02:00
Jacob Bom
2ca7ff82ef Update headers to 2018 (#962)
Also add two missing headers.
[ci skip]
2018-01-04 17:16:06 +02:00
Eldinnie
042d4bb2a4
add support for 3.5 api (#920)
* add support for 3.5 api

* removed "unused" import by accident

* Hardcoded values

Appearantly TG decided to change the size of a send image (again)

* test_official

* Improve coverage

* Finishing up

* spelling error

* pytest fixed tot < than 3.3 for python 3.3 support

* flake8

* rollback requirements

* as per CR

* object for provider_data

Make it possible to send an object that will be json-serialized for send_invoice + tests

* shorten error message

* using string_types
2017-12-08 22:38:59 +01: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
Ihor Polyakov
454ab050c0 Decrease number of requests in tests (#755) 2017-08-01 00:16:44 +03:00
Eldinnie
8d1d38cc4c send_* now accepts tg-objects (#742)
Fixes #731
2017-07-25 01:35:22 +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
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
Jacob Bom
512ca2643f Fix weird import in phototest 2017-06-22 15:40:43 +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
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
Eldin
281bd67298 test_document done
* Changed to new method of non-static file_id
* removed obsolete tests.
2017-06-21 17:38:20 +02:00
Eldin
f6a98d7888 test_photo done
* Changed to new method of non-static file_id
* removed obsolete tests.
2017-06-21 17:21:18 +02:00
azogue
84b59c8cb2 unittest sending non standard jpg photo with bytesio stream 2017-05-29 09:38:02 +02:00
Jacob Bom
1b7f83625c Update copyright notice to include 2017
Not strictly needed, but it helps show that the project is being actively
developed which I find important.
2017-05-15 00:36:49 +03:00
Jacob Bom
da01601ff9 Add equality rich comparision operators to telegram objects (#604)
fixes #587
2017-05-15 00:29:31 +03:00
Noam Meltzer
78088f4f6a Fix grammer: 'a object' -> 'an object' 2016-10-17 01:22:40 +03:00
Jannes Höke
cbe057083f fix test_send_photo_resend 2016-09-24 14:16:04 +02: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
leandrotoledo
f0b91ecf46 Fix travis 2016-06-03 13:44:24 -04:00
Leandro Toledo
880746baed Column width to 90 #259 2016-05-14 21:52:35 -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
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
Leandro Toledo
2a7b03e7c2 Fix travis - file_size is irrelevant for resend test 2016-01-13 19:15:11 -02:00
Leandro Toledo
9f55c15cc7 Add sendPhoto tests, fix file_id casting to str instead unicode 2016-01-11 22:25:46 -02:00