def test_validate_params( m_telebot: telebot.AsyncTeleBot, mocker: MockFixture, ) -> None: chat_id = 123456 mocked_chat = mocker.MagicMock() m_telebot.get_chat.return_value = mocked_chat mocked_chat.wait.return_value = tb_types.Chat(chat_id, None) TelegramGroupChat.validate_params( { 'bot_token': FAKE_TOKEN, 'chat_id': chat_id, }, )
def telegram_chat(db) -> types.Chat: return types.Chat(RESPONCE_TG_ID, "private")
def private_chat(): return types.Chat(id=11, type='private')
def telegram_chat(): return types.Chat(CHAT_ID, 'private')
def create_chat(**kwargs): return types.Chat(id=kwargs.get('id') or random.randint(1, 100), type='private')