From 32994008d178c8e0f1647a861604bdbddceaf75b Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Thu, 17 Oct 2024 20:59:30 -0500 Subject: [PATCH] Do a comparison on user.profile to verify it's not None. 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. --- tests/test_authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_authentication.py b/tests/test_authentication.py index 3fd3714..6ed9cb6 100644 --- a/tests/test_authentication.py +++ b/tests/test_authentication.py @@ -320,7 +320,7 @@ def test_extended_model_claim_mapping_missing_instance(self): self.assertEqual(user.last_name, "Doe") self.assertEqual(user.email, "john.doe@example.com") with self.assertRaises(ObjectDoesNotExist): - user.profile # noqa + self.assertIsNone(user.profile) @mock_adfs("2016") def test_extended_model_claim_mapping(self):