mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 06:25:12 +01:00
Adapt Test Suite to Changes in Error Messages (#4238)
This commit is contained in:
parent
615f1bf20b
commit
622fdf7fa3
14 changed files with 17 additions and 17 deletions
|
@ -351,7 +351,7 @@ class TestAnimationWithRequest(TestAnimationBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_animation(
|
||||
chat_id, animation, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -378,7 +378,7 @@ class TestAudioWithRequest(TestAudioBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_audio(
|
||||
chat_id, audio, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -185,7 +185,7 @@ class TestContactWithRequest(TestContactBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_contact(
|
||||
chat_id, contact=contact, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -364,7 +364,7 @@ class TestDocumentWithRequest(TestDocumentBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_document(
|
||||
chat_id, document, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -873,7 +873,7 @@ class TestSendMediaGroupWithRequest:
|
|||
)
|
||||
assert [m.reply_to_message is None for m in messages]
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_media_group(
|
||||
chat_id, media_group, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -218,7 +218,7 @@ class TestLocationWithRequest:
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_location(
|
||||
chat_id, location=location, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -384,7 +384,7 @@ class TestPhotoWithRequest(TestPhotoBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_photo(
|
||||
chat_id, photo_file, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -457,7 +457,7 @@ class TestStickerWithRequest(TestStickerBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_sticker(
|
||||
chat_id, sticker, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -200,7 +200,7 @@ class TestVenueWithRequest(TestVenueBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_venue(
|
||||
chat_id, venue=venue, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -386,7 +386,7 @@ class TestVideoWithRequest(TestVideoBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_video(
|
||||
chat_id, video, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -287,7 +287,7 @@ class TestVideoNoteWithRequest(TestVideoNoteBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_video_note(
|
||||
chat_id, video_note, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -335,7 +335,7 @@ class TestVoiceWithRequest(TestVoiceBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_voice(
|
||||
chat_id, voice, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
|
@ -312,7 +312,7 @@ class TestInvoiceWithRequest(TestInvoiceBase):
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_invoice(
|
||||
chat_id,
|
||||
self.title,
|
||||
|
|
|
@ -2552,7 +2552,7 @@ class TestBotWithRequest:
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_poll(
|
||||
chat_id,
|
||||
question=question,
|
||||
|
@ -2609,7 +2609,7 @@ class TestBotWithRequest:
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_dice(
|
||||
chat_id, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
@ -2999,7 +2999,7 @@ class TestBotWithRequest:
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_game(
|
||||
chat_id, game_short_name, reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
@ -3595,7 +3595,7 @@ class TestBotWithRequest:
|
|||
)
|
||||
assert message.reply_to_message is None
|
||||
else:
|
||||
with pytest.raises(BadRequest, match="Message to reply not found"):
|
||||
with pytest.raises(BadRequest, match="Message to be replied not found"):
|
||||
await default_bot.send_message(
|
||||
chat_id, "test", reply_to_message_id=reply_to_message.message_id
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue