Adapt Test Suite to Changes in Error Messages (#4238)

This commit is contained in:
Bibo-Joshi 2024-05-06 22:35:11 +02:00 committed by GitHub
parent 615f1bf20b
commit 622fdf7fa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 17 additions and 17 deletions

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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,

View file

@ -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
)