8000 Adapt Test Suite to Changes in Error Messages (#4238) · gtkacz/python-telegram-bot@622fdf7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 622fdf7

Browse files
authored
Adapt Test Suite to Changes in Error Messages (python-telegram-bot#4238)
1 parent 615f1bf commit 622fdf7

14 files changed

+17
-17
lines changed

tests/_files/test_animation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ async def test_send_animation_default_allow_sending_without_reply(
351351
)
352352
assert message.reply_to_message is None
353353
else:
354-
with pytest.raises(BadRequest, match="Message to reply not found"):
354+
with pytest.raises(BadRequest, match="Message to be replied not found"):
355355
await default_bot.send_animation(
356356
chat_id, animation, reply_to_message_id=reply_to_message.message_id
357357
)

tests/_files/test_audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ async def test_send_audio_default_allow_sending_without_reply(
378378
)
379379
assert message.reply_to_message is None
380380
else:
381-
with pytest.raises(BadRequest, match="Message to reply not found"):
381+
with pytest.raises(BadRequest, match="Message to be replied not found"):
382382
await default_bot.send_audio(
383383
chat_id, audio, reply_to_message_id=reply_to_message.message_id
384384
)

tests/_files/test_contact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ async def test_send_contact_default_allow_sending_without_reply(
185185
)
186186
assert message.reply_to_message is None
187187
else:
188-
with pytest.raises(BadRequest, match="Message to reply not found"):
188+
with pytest.raises(BadRequest, match="Message to be replied not found"):
189189
await default_bot.send_contact(
190190
chat_id, contact=contact, reply_to_message_id=reply_to_message.message_id
191191
)

tests/_files/test_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ async def test_send_document_default_allow_sending_without_reply(
364364
)
365365
assert message.reply_to_message is None
366366
else:
367-
with pytest.raises(BadRequest, match="Message to reply not found"):
367+
with pytest.raises(BadRequest, match="Message to be replied not found"):
368368
await default_bot.send_document(
369369
chat_id, document, reply_to_message_id=reply_to_message.message_id
370370
)

tests/_files/test_inputmedia.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ async def test_send_media_group_default_allow_sending_without_reply(
873873
)
874874
assert [m.reply_to_message is None for m in messages]
875875
else:
876-
with pytest.raises(BadRequest, match="Message to reply not found"):
876+
with pytest.raises(BadRequest, match="Message to be replied not found"):
877877
await default_bot.send_media_group(
878878
chat_id, media_group, reply_to_message_id=reply_to_message.message_id
879879
)

tests/_files/test_location.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ async def test_send_location_default_allow_sending_without_reply(
218218
)
219219
assert message.reply_to_message is None
220220
else:
221-
with pytest.raises(BadRequest, match="Message to reply not found"):
221+
with pytest.raises(BadRequest, match="Message to be replied not found"):
222222
await default_bot.send_location(
223223
chat_id, location=location, reply_to_message_id=reply_to_message.message_id
224224
)

tests/_files/test_photo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ async def test_send_photo_default_allow_sending_without_reply(
384384
)
385385
assert message.reply_to_message is None
386386
else:
387-
with pytest.raises(BadRequest, match="Message to reply not found"):
387+
with pytest.raises(BadRequest, match="Message to be replied not found"):
388388
await default_bot.send_photo(
389389 A3E2
chat_id, photo_file, reply_to_message_id=reply_to_message.message_id
390390
)

tests/_files/test_sticker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ async def test_send_sticker_default_allow_sending_without_reply(
457457
)
458458
assert message.reply_to_message is None
459459
else:
460-
with pytest.raises(BadRequest, match="Message to reply not found"):
460+
with pytest.raises(BadRequest, match="Message to be replied not found"):
461461
await default_bot.send_sticker(
462462
chat_id, sticker, reply_to_message_id=reply_to_message.message_id
463463
)

tests/_files/test_venue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ async def test_send_venue_default_allow_sending_without_reply(
200200
)
201201
assert message.reply_to_message is None
202202
else:
203-
with pytest.raises(BadRequest, match="Message to reply not found"):
203+
with pytest.raises(BadRequest, match="Message to be replied not found"):
204204
await default_bot.send_venue(
205205
chat_id, venue=venue, reply_to_message_id=reply_to_message.message_id
206206
)

tests/_files/test_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ async def test_send_video_default_allow_sending_without_reply(
386386
)
387387
assert message.reply_to_message is None
388388
else:
389-
with pytest.raises(BadRequest, match="Message to reply not found"):
389+
with pytest.raises(BadRequest, match="Message to be replied not found"):
390390
await default_bot.send_video(
391391
chat_id, video, reply_to_message_id=reply_to_message.message_id
392392
)

tests/_files/test_videonote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ async def test_send_video_note_default_allow_sending_without_reply(
287287
)
288288
assert message.reply_to_message is None
289289
else:
290-
with pytest.raises(BadRequest, match="Message to reply not found"):
290+
with pytest.raises(BadRequest, match="Message to be replied not found"):
291291
await default_bot.send_video_note(
292292
chat_id, video_note, reply_to_message_id=reply_to_message.message_id
293293
)

tests/_files/test_voice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ async def test_send_voice_default_allow_sending_without_reply(
335335
)
336336
assert message.reply_to_message is None
337337
else:
338-
with pytest.raises(BadRequest, match="Message to reply not found"):
338+
with pytest.raises(BadRequest, match="Message to be replied not found"):
339339
await default_bot.send_voice(
340340
chat_id, voice, reply_to_message_id=reply_to_message.message_id
341341
)

tests/_payment/test_invoice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ async def test_send_invoice_default_allow_sending_without_reply(
312312
)
313313
assert message.reply_to_message is None
314314
else:
315-
with pytest.raises(BadRequest, match="Message to reply not found"):
315+
with pytest.raises(BadRequest, match="Message to be replied not found"):
316316
await default_bot.send_invoice(
317317
chat_id,
318318
self.title,

tests/test_bot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,7 +2552,7 @@ async def test_send_poll_default_allow_sending_without_reply(
25522552
)
25532553
assert message.reply_to_message is None
25542554
else:
2555-
with pytest.raises(BadRequest, match="Message to reply not found"):
2555+
with pytest.raises(BadRequest, match="Message to be replied not found"):
25562556
await default_bot.send_poll(
25572557
chat_id,
25582558
question=question,
@@ -2609,7 +2609,7 @@ async def test_send_dice_default_allow_sending_without_reply(
26092609
)
26102610
assert message.reply_to_message is None
26112611
else:
2612-
with pytest.raises(BadRequest, match="Message to reply not found"):
2612+
with pytest.raises(BadRequest, match="Message to be replied not found"):
26132613
await default_bot.send_dice(
26142614
chat_id, reply_to_message_id=reply_to_message.message_id
26152615
)
@@ -2999,7 +2999,7 @@ async def test_send_game_default_allow_sending_without_reply(
29992999
)
30003000
assert message.reply_to_message is None
30013001
else:
3002-
with pytest.raises(BadRequest, match="Message to reply not found"):
3002+
with pytest.raises(BadRequest, match="Message to be replied not found"):
30033003
await default_bot.send_game(
30043004
chat_id, game_short_name, reply_to_message_id=reply_to_message.message_id
30053005
)
@@ -3595,7 +3595,7 @@ async def test_send_message_default_allow_sending_without_reply(
35953595
)
35963596
assert message.reply_to_message is None
35973597
else:
3598-
with pytest.raises(BadRequest, match="Message to reply not found"):
3598+
with pytest.raises(BadRequest, match="Message to be replied not found"):
35993599
await default_bot.send_message(
36003600
chat_id, "test", reply_to_message_id=reply_to_message.message_id
36013601
)

0 commit comments

Comments
 (0)
0