From 51e3453dcad752397342228c7642391fbe078f8d Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 10 May 2021 20:14:21 +0200 Subject: [PATCH] admin: fix linting in api tests Signed-off-by: Jens Langhammer --- authentik/admin/tests/test_api.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/authentik/admin/tests/test_api.py b/authentik/admin/tests/test_api.py index 7d98357ad..92fbd9b83 100644 --- a/authentik/admin/tests/test_api.py +++ b/authentik/admin/tests/test_api.py @@ -1,5 +1,4 @@ """test admin api""" -from authentik.events.monitored_tasks import TaskResultStatus from json import loads from django.test import TestCase @@ -8,6 +7,7 @@ from django.urls import reverse from authentik import __version__ from authentik.core.models import Group, User from authentik.core.tasks import clean_expired_models +from authentik.events.monitored_tasks import TaskResultStatus class TestAdminAPI(TestCase): @@ -35,17 +35,20 @@ class TestAdminAPI(TestCase): """Test Task API (read single)""" clean_expired_models.delay() response = self.client.get( - reverse("authentik_api:admin_system_tasks-detail", kwargs={ - "pk": "clean_expired_models" - })) + reverse( + "authentik_api:admin_system_tasks-detail", + kwargs={"pk": "clean_expired_models"}, + ) + ) self.assertEqual(response.status_code, 200) body = loads(response.content) self.assertEqual(body["status"], TaskResultStatus.SUCCESSFUL.name) self.assertEqual(body["task_name"], "clean_expired_models") response = self.client.get( - reverse("authentik_api:admin_system_tasks-detail", kwargs={ - "pk": "qwerqwer" - })) + reverse( + "authentik_api:admin_system_tasks-detail", kwargs={"pk": "qwerqwer"} + ) + ) self.assertEqual(response.status_code, 404) def test_tasks_retry(self):