mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-03 10:50:20 +00:00
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 <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
ab235be2fc
commit
6b8745fd17
@ -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))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user