Skip to content

Commit

Permalink
Fix compatibility with cryptography 39
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Bompard <[email protected]>
  • Loading branch information
abompard committed Jan 16, 2023
1 parent 7f83b45 commit 77fa87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/security/test_ipa.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest
import requests
from cryptography.fernet import Fernet
from cryptography.fernet import Fernet, InvalidToken
from flask import current_app
from python_freeipa.exceptions import BadRequest, FreeIPAError

Expand Down Expand Up @@ -41,7 +41,7 @@ def test_ipa_session_invalid(client, logged_in_dummy_user):
"""We should raise an exception when the session can't be decrypted."""
with client.session_transaction() as sess:
sess["noggin_session"] = "invalid"
with pytest.raises(TypeError):
with pytest.raises(InvalidToken):
maybe_ipa_session(current_app, sess)


Expand Down

0 comments on commit 77fa87f

Please sign in to comment.