mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2026-06-24 18:25:30 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f790c3cb2 | |||
| 30749c3b66 | |||
| 8f0447156b | |||
| df000f8086 | |||
| 3d835527e0 | |||
| 323052a6c9 | |||
| ef4871cce1 | |||
| f355af1d2b | |||
| 121e365348 | |||
| 82f1d18f4b | |||
| 79cdb6cafe |
+11
@@ -1,3 +1,14 @@
|
||||
2015-09-05
|
||||
Released 2.8.2
|
||||
Fix regression on Telegram ReplyMarkup
|
||||
Add certificate to is_inputfile method
|
||||
|
||||
|
||||
2015-09-05
|
||||
Released 2.8.1
|
||||
Fix regression on Telegram objects with thumb properties
|
||||
|
||||
|
||||
2015-09-04
|
||||
Released 2.8
|
||||
TelegramError when chat_id is empty for send* methods
|
||||
|
||||
+2
-2
@@ -264,9 +264,9 @@ You may copy, distribute and modify the software provided that modifications are
|
||||
_`Contact`
|
||||
==========
|
||||
|
||||
Feel free to join to our `Telegram group <https://telegram.me/joinchat/00b9c0f802509b94d52953d3fa1ec504>`_.
|
||||
Feel free to join to our `Telegram group <https://telegram.me/joinchat/00b9c0f802509b946b2e8e98b73e19be>`_.
|
||||
|
||||
*If you face trouble joining in the group please ping me on Telegram (@leandrotoledo), I'll be glad to add you.*
|
||||
If you face trouble joining in the group please ping me `via Telegram <https://telegram.me/leandrotoledo>`_, I'll be glad to add you.
|
||||
|
||||
=======
|
||||
_`TODO`
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ author = u'Leandro Toledo'
|
||||
# The short X.Y version.
|
||||
version = '2.8'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2.8'
|
||||
release = '2.8.2'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
||||
@@ -15,7 +15,7 @@ def read(*paths):
|
||||
|
||||
setup(
|
||||
name='python-telegram-bot',
|
||||
version='2.8',
|
||||
version='2.8.2',
|
||||
author='Leandro Toledo',
|
||||
author_email='leandrotoledodesouza@gmail.com',
|
||||
license='LGPLv3',
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"""A library that provides a Python interface to the Telegram Bot API"""
|
||||
|
||||
__author__ = 'leandrotoledodesouza@gmail.com'
|
||||
__version__ = '2.8'
|
||||
__version__ = '2.8.2'
|
||||
|
||||
from .base import TelegramObject
|
||||
from .user import User
|
||||
|
||||
@@ -171,7 +171,8 @@ class InputFile(object):
|
||||
bool
|
||||
"""
|
||||
if data:
|
||||
file_types = ['audio', 'document', 'photo', 'video', 'voice']
|
||||
file_types = ['audio', 'document', 'photo', 'video', 'voice',
|
||||
'certificate']
|
||||
file_type = [i for i in list(data.keys()) if i in file_types]
|
||||
|
||||
if file_type:
|
||||
|
||||
@@ -27,6 +27,3 @@ class ReplyMarkup(TelegramObject):
|
||||
@staticmethod
|
||||
def de_json(data):
|
||||
pass
|
||||
|
||||
def to_dict(self):
|
||||
pass
|
||||
|
||||
@@ -185,6 +185,7 @@ class BotTest(unittest.TestCase):
|
||||
|
||||
self.assertTrue(self.is_json(message.to_json()))
|
||||
self.assertEqual(message.document.file_size, 12948)
|
||||
self.assertTrue(isinstance(message.document.thumb, telegram.PhotoSize))
|
||||
|
||||
def testSendGIFURLDocument(self):
|
||||
'''Test the telegram.Bot sendDocument method'''
|
||||
@@ -203,6 +204,7 @@ class BotTest(unittest.TestCase):
|
||||
|
||||
self.assertTrue(self.is_json(message.to_json()))
|
||||
self.assertEqual(message.document.file_id, 'BQADAQADHAADNTwtBxZxUGKyxYbYAg')
|
||||
self.assertTrue(isinstance(message.document.thumb, telegram.PhotoSize))
|
||||
|
||||
def testSendVideo(self):
|
||||
'''Test the telegram.Bot sendVideo method'''
|
||||
@@ -214,6 +216,8 @@ class BotTest(unittest.TestCase):
|
||||
self.assertTrue(self.is_json(message.to_json()))
|
||||
self.assertEqual(message.video.file_size, 326534)
|
||||
self.assertEqual(message.caption, 'testSendVideo')
|
||||
if message.video.thumb:
|
||||
self.assertTrue(isinstance(message.video.thumb, telegram.PhotoSize))
|
||||
|
||||
def testResendVideo(self):
|
||||
'''Test the telegram.Bot sendVideo method'''
|
||||
@@ -223,6 +227,7 @@ class BotTest(unittest.TestCase):
|
||||
|
||||
self.assertTrue(self.is_json(message.to_json()))
|
||||
self.assertEqual(message.video.duration, 4)
|
||||
self.assertTrue(isinstance(message.video.thumb, telegram.PhotoSize))
|
||||
|
||||
def testResendSticker(self):
|
||||
'''Test the telegram.Bot sendSticker method'''
|
||||
@@ -232,6 +237,7 @@ class BotTest(unittest.TestCase):
|
||||
|
||||
self.assertTrue(self.is_json(message.to_json()))
|
||||
self.assertEqual(message.sticker.file_size, 39518)
|
||||
self.assertTrue(isinstance(message.sticker.thumb, telegram.PhotoSize))
|
||||
|
||||
def testSendLocation(self):
|
||||
'''Test the telegram.Bot sendLocation method'''
|
||||
|
||||
Reference in New Issue
Block a user