diff --git a/tests/test_bot.py b/tests/test_bot.py index 54fa28f11cb..b8cdf5f17f1 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -2863,10 +2863,13 @@ async def test_edit_message_text_entities(self, bot, message): assert message.entities == tuple(entities) @pytest.mark.parametrize("default_bot", [{"parse_mode": "Markdown"}], indirect=True) - async def test_edit_message_text_default_parse_mode(self, default_bot, message): + async def test_edit_message_text_default_parse_mode(self, default_bot, chat_id): test_string = "Italic Bold Code" test_markdown_string = "_Italic_ *Bold* `Code`" + # can't use `message` fixture as that would change its value + message = await default_bot.send_message(chat_id, "dummy text") + message = await default_bot.edit_message_text( text=test_markdown_string, chat_id=message.chat_id, @@ -2937,10 +2940,16 @@ async def test_edit_message_caption_entities(self, bot, media_message): # edit_message_media is tested in test_inputmedia @pytest.mark.parametrize("default_bot", [{"parse_mode": "Markdown"}], indirect=True) - async def test_edit_message_caption_default_parse_mode(self, default_bot, media_message): + async def test_edit_message_caption_default_parse_mode(self, default_bot, chat_id): test_string = "Italic Bold Code" test_markdown_string = "_Italic_ *Bold* `Code`" + # can't use `media_message` fixture as that would change its value + with data_file("telegram.ogg").open("rb") as f: + media_message = await default_bot.send_voice( + chat_id, voice=f, caption="my caption", read_timeout=10 + ) + message = await default_bot.edit_message_caption( caption=test_markdown_string, chat_id=media_message.chat_id, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy