api: fix unittests
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
ae6a406b1d
commit
f9ce41229d
|
@ -84,7 +84,7 @@ class TestAdminAPI(TestCase):
|
||||||
response = self.client.get(reverse("authentik_api:admin_workers"))
|
response = self.client.get(reverse("authentik_api:admin_workers"))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
body = loads(response.content)
|
body = loads(response.content)
|
||||||
self.assertEqual(body["pagination"]["count"], 0)
|
self.assertEqual(body["count"], 0)
|
||||||
|
|
||||||
def test_metrics(self):
|
def test_metrics(self):
|
||||||
"""Test metrics API"""
|
"""Test metrics API"""
|
||||||
|
|
|
@ -11,6 +11,6 @@ class TestConfig(APITestCase):
|
||||||
def test_config(self):
|
def test_config(self):
|
||||||
"""Test YAML generation"""
|
"""Test YAML generation"""
|
||||||
response = self.client.get(
|
response = self.client.get(
|
||||||
reverse("authentik_api:configs"),
|
reverse("authentik_api:config"),
|
||||||
)
|
)
|
||||||
self.assertTrue(loads(response.content.decode()))
|
self.assertTrue(loads(response.content.decode()))
|
||||||
|
|
|
@ -22,7 +22,6 @@ from authentik.events.models import cleanse_dict
|
||||||
from authentik.flows.challenge import (
|
from authentik.flows.challenge import (
|
||||||
AccessDeniedChallenge,
|
AccessDeniedChallenge,
|
||||||
Challenge,
|
Challenge,
|
||||||
ChallengeResponse,
|
|
||||||
ChallengeTypes,
|
ChallengeTypes,
|
||||||
HttpChallengeResponse,
|
HttpChallengeResponse,
|
||||||
RedirectChallenge,
|
RedirectChallenge,
|
||||||
|
|
Reference in New Issue