From 5a58f6ee6493675eeed693e02189b6e67fe0ce5b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 12 Apr 2022 20:35:13 +0200 Subject: [PATCH] providers/oauth2: remove test for non sa user Signed-off-by: Jens Langhammer --- .../tests/test_token_client_credentials.py | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/authentik/providers/oauth2/tests/test_token_client_credentials.py b/authentik/providers/oauth2/tests/test_token_client_credentials.py index 66e5428b1..077eb0310 100644 --- a/authentik/providers/oauth2/tests/test_token_client_credentials.py +++ b/authentik/providers/oauth2/tests/test_token_client_credentials.py @@ -84,26 +84,6 @@ class TestTokenClientCredentials(OAuthTestCase): {"error": "invalid_grant", "error_description": TokenError.errors["invalid_grant"]}, ) - def test_non_sa(self): - """test non service-account""" - self.user.attributes[USER_ATTRIBUTE_SA] = False - self.user.save() - response = self.client.post( - reverse("authentik_providers_oauth2:token"), - { - "grant_type": GRANT_TYPE_CLIENT_CREDENTIALS, - "scope": SCOPE_OPENID, - "client_id": self.provider.client_id, - "username": "sa", - "password": self.token.key, - }, - ) - self.assertEqual(response.status_code, 400) - self.assertJSONEqual( - response.content.decode(), - {"error": "invalid_grant", "error_description": TokenError.errors["invalid_grant"]}, - ) - def test_no_provider(self): """test no provider""" self.app.provider = None