mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 12:25:45 +01:00
fix message to json
This commit is contained in:
parent
e5df2072e4
commit
17ac73c3c4
2 changed files with 4 additions and 1 deletions
|
@ -35,7 +35,7 @@ class Botan(object):
|
|||
except AttributeError:
|
||||
self.logger.warn('No chat_id in message')
|
||||
return False
|
||||
data = json.dumps(message.__dict__)
|
||||
data = message.to_json()
|
||||
try:
|
||||
url = self.url_template.format(token=str(self.token),
|
||||
uid=str(uid),
|
||||
|
|
|
@ -17,6 +17,9 @@ class MessageMock(object):
|
|||
def __init__(self, chat_id):
|
||||
self.chat_id = chat_id
|
||||
|
||||
def to_json(self):
|
||||
return "{}"
|
||||
|
||||
|
||||
class BotanTest(BaseTest, unittest.TestCase):
|
||||
"""This object represents Tests for Botan analytics integration."""
|
||||
|
|
Loading…
Add table
Reference in a new issue