Esempio n. 1
0
def chat():
    return Chat.get_chat(123)
Esempio n. 2
0
def test_get_chat():
    chat = Chat.get_chat(123)

    assert isinstance(chat, Chat)
    assert chat.id == 123
Esempio n. 3
0
def test_set_token(random_token):
    Chat.set_token(123, random_token)
    chat = Chat.get_chat(123)

    assert chat.token == random_token
Esempio n. 4
0
def _send_token(message):
    chat = Chat.get_chat(message.chat.id)
    send_message(chat, chat.token)