Fix oauth to respond with unhashed token on creation

This commit is contained in:
Georg Krause 2022-11-08 19:37:05 +00:00 committed by JuniorJPDJ
commit 515b502364
3 changed files with 19 additions and 1 deletions

View file

@ -19,6 +19,7 @@ def test_apps_post(api_client, db):
assert response.status_code == 201
app = models.Application.objects.get(name=data["name"])
setattr(app, "client_secret", response.data["client_secret"])
assert app.client_type == models.Application.CLIENT_CONFIDENTIAL
assert app.authorization_grant_type == models.Application.GRANT_AUTHORIZATION_CODE
@ -40,6 +41,7 @@ def test_apps_post_logged_in_user(logged_in_api_client, db):
assert response.status_code == 201
app = models.Application.objects.get(name=data["name"])
setattr(app, "client_secret", response.data["client_secret"])
assert app.client_type == models.Application.CLIENT_CONFIDENTIAL
assert app.authorization_grant_type == models.Application.GRANT_AUTHORIZATION_CODE