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:
Joseph Nuthalpati 2017-09-08 15:27:04 +05:30 committed by James Valleroy
parent ab235be2fc
commit 6b8745fd17
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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))