mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add Chat test for telebot.
This commit is contained in:
parent
0bd284afc7
commit
9ee341f5e6
@ -203,6 +203,13 @@ class TestTeleBot:
|
|||||||
assert int(ret_msg.location.longitude) == int(lon)
|
assert int(ret_msg.location.longitude) == int(lon)
|
||||||
assert int(ret_msg.location.latitude) == int(lat)
|
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):
|
def create_text_message(self, text):
|
||||||
params = {'text': text}
|
params = {'text': text}
|
||||||
chat = types.User(11, 'test')
|
chat = types.User(11, 'test')
|
||||||
|
Loading…
Reference in New Issue
Block a user