Updated 3 failing tests of test_message.py. by Palaptin · Pull Request #4431 · python-telegram-bot/python-telegram-bot

The tests test_link_with_topics and test_link_with_reply were failing if beeing runned alone ( since message.chat.type was private).

The test test_build_reply_arguments_chat_id_and_message_id was failing randomly, mostly when using pytest --lf (about 1 in 10 times). The reason was message.chat.username being set to 'username', so setting it to None will solve this problem.

harshil21

requested changes Aug 16, 2024

… value 'function'

Removed setting of message.chat.username to None in test 'test_build_reply_arguments_chat_id_and_message_id' since it is no longer needed.

executed multiple times 'pytest -m no_req -n auto --dist=loadgroup --lf' to validate all tests in test_message.py will still pass.

harshil21