From 6b8745fd1717ab5cbd51d39d77cc90276d87da4a Mon Sep 17 00:00:00 2001 From: Joseph Nuthalpati Date: Fri, 8 Sep 2017 15:27:04 +0530 Subject: [PATCH] captcha: fix failing test Fixed a test that failed because of fixing a django deprecation warning. request.user.is_authenticated() method is replaced by the property `is_authenticated` Signed-off-by: Joseph Nuthalpati Reviewed-by: James Valleroy --- plinth/tests/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/tests/test_utils.py b/plinth/tests/test_utils.py index 0a86d4378..1a5b5cea8 100644 --- a/plinth/tests/test_utils.py +++ b/plinth/tests/test_utils.py @@ -44,7 +44,7 @@ class TestIsAdminUser(TestCase): """Test anonymous user is reported as non-admin.""" super(TestIsAdminUser, self).setUp() self.request.user = Mock() - self.request.user.is_authenticated.return_value = False + self.request.user.is_authenticated = False self.assertFalse(is_user_admin(self.request)) self.assertFalse(is_user_admin(self.request, cached=True))