mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2026-06-19 07:35:19 +00:00
Fix a Failing Test Case (#4793)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
internal = "Fix a Failing Test Case"
|
||||
[[pull_requests]]
|
||||
uid = "4793"
|
||||
author_uid = "Bibo-Joshi"
|
||||
closes_threads = []
|
||||
@@ -418,7 +418,10 @@ class TestPassportWithoutRequest(PassportTestBase):
|
||||
with pytest.raises(TypeError):
|
||||
Bot(offline_bot.token, private_key="Invalid key!")
|
||||
|
||||
with pytest.raises(ValueError, match="Could not deserialize key data"):
|
||||
# Different error messages for different cryptography versions
|
||||
with pytest.raises(
|
||||
ValueError, match="(Could not deserialize key data)|(Unable to load PEM file)"
|
||||
):
|
||||
Bot(offline_bot.token, private_key=b"Invalid key!")
|
||||
|
||||
def test_all_types(self, passport_data, offline_bot, all_passport_data):
|
||||
|
||||
Reference in New Issue
Block a user