From 9ee341f5e60c78b8d043c9b6eda3d68bd12a7d4d Mon Sep 17 00:00:00 2001 From: eternnoir Date: Mon, 12 Oct 2015 10:46:20 +0800 Subject: [PATCH] Add Chat test for telebot. --- tests/test_telebot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_telebot.py b/tests/test_telebot.py index 6cf1ae4..04d4fa8 100644 --- a/tests/test_telebot.py +++ b/tests/test_telebot.py @@ -203,6 +203,13 @@ class TestTeleBot: assert int(ret_msg.location.longitude) == int(lon) assert int(ret_msg.location.latitude) == int(lat) + def test_Chat(self): + tb = telebot.TeleBot(TOKEN) + me = tb.get_me() + msg = tb.send_message(CHAT_ID, 'Test') + assert me.id == msg.from_user.id + assert msg.chat.id == CHAT_ID + def create_text_message(self, text): params = {'text': text} chat = types.User(11, 'test')