fix message to json

This commit is contained in:
Jannes Höke 2016-02-07 14:46:36 +01:00
parent e5df2072e4
commit 17ac73c3c4
2 changed files with 4 additions and 1 deletions

View file

@ -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),

View file

@ -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."""