mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-02-16 18:31:45 +01:00
Merge pull request #500 from python-telegram-bot/bug470
Fix bad formatting of BadRequest exception message Fixes #470
This commit is contained in:
commit
d714da4b36
3 changed files with 3 additions and 3 deletions
|
@ -415,7 +415,7 @@ class Bot(TelegramObject):
|
|||
chat_id: Unique identifier for the message recipient - Chat id.
|
||||
document: File to send. You can either pass a file_id as String to resend a file that
|
||||
is already on the Telegram servers, or upload a new file using multipart/form-data.
|
||||
filename (Optional[str]): File name that shows in telegram message (it is usefull when
|
||||
filename (Optional[str]): File name that shows in telegram message (it is useful when
|
||||
you send file generated by temp module, for example).
|
||||
caption (Optional[str]): Document caption (may also be used when resending documents by
|
||||
file_id), 0-200 characters.
|
||||
|
|
|
@ -182,7 +182,7 @@ class Request(object):
|
|||
if resp.status in (401, 403):
|
||||
raise Unauthorized()
|
||||
elif resp.status == 400:
|
||||
raise BadRequest(repr(message))
|
||||
raise BadRequest(message)
|
||||
elif resp.status == 404:
|
||||
raise InvalidToken()
|
||||
elif resp.status == 502:
|
||||
|
|
|
@ -365,7 +365,7 @@ class BotTest(BaseTest, unittest.TestCase):
|
|||
chat_id=game.chat_id,
|
||||
message_id=game.message_id)
|
||||
|
||||
self.assertTrue('BOT_SCORE_NOT_MODIFIED' in cm.exception.message)
|
||||
self.assertTrue('BOT_SCORE_NOT_MODIFIED' in str(cm.exception.message).upper())
|
||||
|
||||
@flaky(3, 1)
|
||||
@timeout(10)
|
||||
|
|
Loading…
Add table
Reference in a new issue