Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt Test Suite to Changes in Error Messages #4238

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/_files/test_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ async def test_send_animation_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ async def test_send_audio_default_allow_sending_without_reply(
)
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
)
2 changes: 1 addition & 1 deletion tests/_files/test_contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async def test_send_contact_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ async def test_send_document_default_allow_sending_without_reply(
)
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
)
2 changes: 1 addition & 1 deletion tests/_files/test_inputmedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ async def test_send_media_group_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ async def test_send_location_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ async def test_send_photo_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_sticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ async def test_send_sticker_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_venue.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async def test_send_venue_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ async def test_send_video_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_videonote.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ async def test_send_video_note_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_files/test_voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ async def test_send_voice_default_allow_sending_without_reply(
)
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
)
Expand Down
2 changes: 1 addition & 1 deletion tests/_payment/test_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ async def test_send_invoice_default_allow_sending_without_reply(
)
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,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2552,7 +2552,7 @@ async def test_send_poll_default_allow_sending_without_reply(
)
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,
Expand Down Expand Up @@ -2609,7 +2609,7 @@ async def test_send_dice_default_allow_sending_without_reply(
)
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
)
Expand Down Expand Up @@ -2999,7 +2999,7 @@ async def test_send_game_default_allow_sending_without_reply(
)
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
)
Expand Down Expand Up @@ -3595,7 +3595,7 @@ async def test_send_message_default_allow_sending_without_reply(
)
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
)
Expand Down
Loading