From f9ce41229d7f35d5fd7198f75706e15b77a4eeaf Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 16 May 2021 22:36:26 +0200 Subject: [PATCH] api: fix unittests Signed-off-by: Jens Langhammer --- authentik/admin/tests/test_api.py | 2 +- authentik/api/tests/test_config.py | 2 +- authentik/flows/views.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/authentik/admin/tests/test_api.py b/authentik/admin/tests/test_api.py index faa5d1397..75e1dac2b 100644 --- a/authentik/admin/tests/test_api.py +++ b/authentik/admin/tests/test_api.py @@ -84,7 +84,7 @@ class TestAdminAPI(TestCase): response = self.client.get(reverse("authentik_api:admin_workers")) self.assertEqual(response.status_code, 200) body = loads(response.content) - self.assertEqual(body["pagination"]["count"], 0) + self.assertEqual(body["count"], 0) def test_metrics(self): """Test metrics API""" diff --git a/authentik/api/tests/test_config.py b/authentik/api/tests/test_config.py index 91952be48..6f6f60f31 100644 --- a/authentik/api/tests/test_config.py +++ b/authentik/api/tests/test_config.py @@ -11,6 +11,6 @@ class TestConfig(APITestCase): def test_config(self): """Test YAML generation""" response = self.client.get( - reverse("authentik_api:configs"), + reverse("authentik_api:config"), ) self.assertTrue(loads(response.content.decode())) diff --git a/authentik/flows/views.py b/authentik/flows/views.py index 027793b8b..509f86fd4 100644 --- a/authentik/flows/views.py +++ b/authentik/flows/views.py @@ -22,7 +22,6 @@ from authentik.events.models import cleanse_dict from authentik.flows.challenge import ( AccessDeniedChallenge, Challenge, - ChallengeResponse, ChallengeTypes, HttpChallengeResponse, RedirectChallenge,