Bibo-Joshi · GitHub

self = <tests.test_bot.TestBotWithRequest object at 0x000001E49E2BA340>
bot = PytestExtBot[token=695104088:AAHfzylIOjSIIS-eOnI20y2E20HodHsfz-0]
chat_id = '675666224'
    async def test_copy_messages(self, bot, chat_id):
        tasks = asyncio.gather(
            bot.send_message(chat_id, text="will be copied 1"),
            bot.send_message(chat_id, text="will be copied 2"),
        )
        msg1, msg2 = await tasks
        copy_messages = await bot.copy_messages(
            chat_id, from_chat_id=chat_id, message_ids=sorted((msg1.message_id, msg2.message_id))
        )
        assert isinstance(copy_messages, tuple)
        tasks = asyncio.gather(
            bot.send_message(chat_id, "temp 1", reply_to_message_id=copy_messages[0].message_id),
            bot.send_message(chat_id, "temp 2", reply_to_message_id=copy_messages[1].message_id),
        )
        temp_msg1, temp_msg2 = await tasks
        forward_msg1 = temp_msg1.reply_to_message
        forward_msg2 = temp_msg2.reply_to_message
>       assert forward_msg1.text == msg1.text
E       AssertionError: assert 'will be copied 2' == 'will be copied 1'
E
E         - will be copied 1
E         ?                ^
E         + will be copied 2
E         ?                ^
tests\test_bot.py:3962: AssertionError

Read the original on github.com ↗