def chat(): return Chat.get_chat(123)
def test_get_chat(): chat = Chat.get_chat(123) assert isinstance(chat, Chat) assert chat.id == 123
def test_set_token(random_token): Chat.set_token(123, random_token) chat = Chat.get_chat(123) assert chat.token == random_token
def _send_token(message): chat = Chat.get_chat(message.chat.id) send_message(chat, chat.token)