From f8e168ace3b8dc436f473c579a7da1c505f91aca Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Thu, 15 Feb 2024 14:35:27 +0530 Subject: [PATCH] Added failing test for setting unusable password on created user objects --- djangosaml2/tests/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/djangosaml2/tests/__init__.py b/djangosaml2/tests/__init__.py index 03e0e93a..366fa176 100644 --- a/djangosaml2/tests/__init__.py +++ b/djangosaml2/tests/__init__.py @@ -462,6 +462,7 @@ def test_assertion_consumer_service(self): user_id = self.client.session[SESSION_KEY] user = User.objects.get(id=user_id) self.assertEqual(user.username, "student") + self.assertEqual(user.has_usable_password(), False) # let's create another user and log in with that one new_user = User.objects.create(username="teacher", password="not-used")