Skip to content

Commit

Permalink
Fix for authentication issue
Browse files Browse the repository at this point in the history
  • Loading branch information
em1208 committed Mar 19, 2024
1 parent ed8c7e1 commit 892cc54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions adrf/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def _authenticate(self):
exceptions.APIException: If an exception occurs during authentication.
"""
self._authenticator, self.user, self.auth = None, None, None

for authenticator in self.authenticators:
try:
if asyncio.iscoroutinefunction(authenticator.authenticate):
Expand Down
1 change: 1 addition & 0 deletions tests/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ async def test_admit_customtoken(self):
response = await MockView.as_view()(request)

self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(request.user, faked_user)

async def test_reject_customtoken(self):
auth = "Bearer expired"
Expand Down

0 comments on commit 892cc54

Please sign in to comment.