Skip to content

Commit

Permalink
Do a comparison on user.profile to verify it's not None.
Browse files Browse the repository at this point in the history
This assert shouldn't matter as user.profile should trigger an
exception. However, there are cases with py3.10 and Django 4.2
that aren't raising the exception as desired.
  • Loading branch information
tim-schilling committed Oct 18, 2024
1 parent 9d638c1 commit 3299400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def test_extended_model_claim_mapping_missing_instance(self):
self.assertEqual(user.last_name, "Doe")
self.assertEqual(user.email, "[email protected]")
with self.assertRaises(ObjectDoesNotExist):
user.profile # noqa
self.assertIsNone(user.profile)

@mock_adfs("2016")
def test_extended_model_claim_mapping(self):
Expand Down

0 comments on commit 3299400

Please sign in to comment.