Skip to content

Commit

Permalink
fix: apply no_user_creation for AccessDenied
Browse files Browse the repository at this point in the history
  • Loading branch information
dnplkndll committed Jan 17, 2025
1 parent b14b991 commit 7282a94
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions auth_oauth_multi_token/tests/test_multi_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,11 @@ def test_no_provider_no_access(self):
"user_id": "oauth_uid_no_one",
}
params = self._fake_params()
try:
with self.assertRaises(exceptions.AccessDenied):
self.user_model._auth_oauth_signin(
self.provider_google.id, validation, params
)
# In version 18.0 AccessDenied exception is raising ValueError exception
except ValueError as e:
self.assertEqual(str(e), "Unknown token version")

with self.assertRaises(exceptions.AccessErrorAccessDenied):
self.user_model.with_context(
**{"no_user_creation": True}
)._auth_oauth_signin(self.provider_google.id, validation, params)

def _test_one_token(self):
validation = {
Expand Down

0 comments on commit 7282a94

Please sign in to comment.