Fix a Failing Test Case (#4793)

This commit is contained in:
Bibo-Joshi
2025-05-19 20:58:14 +02:00
committed by GitHub
parent fc3863ac9a
commit 8782ae7bb5
2 changed files with 9 additions and 1 deletions
@@ -0,0 +1,5 @@
internal = "Fix a Failing Test Case"
[[pull_requests]]
uid = "4793"
author_uid = "Bibo-Joshi"
closes_threads = []
+4 -1
View File
@@ -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):