Skip to content

Commit

Permalink
Adjust Tests to New Error Messages (#3970)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi committed Nov 11, 2023
1 parent b1fc059 commit da3bc69
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tests/_files/test_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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_contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -335,7 +335,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -822,7 +822,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -189,7 +189,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -357,7 +357,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -399,7 +399,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -171,7 +171,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -359,7 +359,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -258,7 +258,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -308,7 +308,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -276,7 +276,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -2180,7 +2180,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 not found"):
with pytest.raises(BadRequest, match="Message to reply not found"):
await default_bot.send_poll(
chat_id,
question=question,
Expand Down Expand Up @@ -2237,7 +2237,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 not found"):
with pytest.raises(BadRequest, match="Message to reply not found"):
await default_bot.send_dice(
chat_id, reply_to_message_id=reply_to_message.message_id
)
Expand Down Expand Up @@ -2570,7 +2570,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 not found"):
with pytest.raises(BadRequest, match="Message to reply 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 @@ -3053,7 +3053,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 not found"):
with pytest.raises(BadRequest, match="Message to reply not found"):
await default_bot.send_message(
chat_id, "test", reply_to_message_id=reply_to_message.message_id
)
Expand Down

0 comments on commit da3bc69

Please sign in to comment.