start fixing tests

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-02-21 18:12:09 +01:00
parent 48a4080699
commit 1889e82309
No known key found for this signature in database
5 changed files with 12 additions and 8 deletions

View file

@ -1,8 +1,8 @@
"""interfaces API"""
from rest_framework.serializers import ModelSerializer
from rest_framework.viewsets import ModelViewSet
from authentik.core.api.used_by import UsedByMixin
from authentik.core.api.used_by import UsedByMixin
from authentik.interfaces.models import Interface

View file

@ -39,8 +39,9 @@ class TesOAuth2DeviceInit(OAuthTestCase):
self.assertEqual(
res.url,
reverse(
"authentik_core:if-flow",
"authentik_interfaces:if",
kwargs={
"if_name": "flow",
"flow_slug": self.device_flow.slug,
},
),
@ -68,8 +69,9 @@ class TesOAuth2DeviceInit(OAuthTestCase):
self.assertEqual(
res.url,
reverse(
"authentik_core:if-flow",
"authentik_interfaces:if",
kwargs={
"if_name": "flow",
"flow_slug": self.provider.authorization_flow.slug,
},
)

View file

@ -33,7 +33,7 @@ class TestFlowsAuthenticator(SeleniumTestCase):
flow: Flow = Flow.objects.get(slug="default-authentication-flow")
self.driver.get(self.url("authentik_core:if-flow", flow_slug=flow.slug))
self.driver.get(self.url("authentik_interfaces:if", if_name="flow", flow_slug=flow.slug))
self.login()
# Get expected token
@ -57,7 +57,7 @@ class TestFlowsAuthenticator(SeleniumTestCase):
"""test TOTP Setup stage"""
flow: Flow = Flow.objects.get(slug="default-authentication-flow")
self.driver.get(self.url("authentik_core:if-flow", flow_slug=flow.slug))
self.driver.get(self.url("authentik_interfaces:if", if_name="flow", flow_slug=flow.slug))
self.login()
self.wait_for_url(self.if_user_url("/library"))
@ -103,7 +103,7 @@ class TestFlowsAuthenticator(SeleniumTestCase):
"""test Static OTP Setup stage"""
flow: Flow = Flow.objects.get(slug="default-authentication-flow")
self.driver.get(self.url("authentik_core:if-flow", flow_slug=flow.slug))
self.driver.get(self.url("authentik_interfaces:if", if_name="flow", flow_slug=flow.slug))
self.login()
self.wait_for_url(self.if_user_url("/library"))

View file

@ -15,7 +15,8 @@ class TestFlowsLogin(SeleniumTestCase):
"""test default login flow"""
self.driver.get(
self.url(
"authentik_core:if-flow",
"authentik_interfaces:if",
if_name="flow",
flow_slug="default-authentication-flow",
)
)

View file

@ -35,7 +35,8 @@ class TestFlowsStageSetup(SeleniumTestCase):
self.driver.get(
self.url(
"authentik_core:if-flow",
"authentik_interfaces:if",
if_name="flow",
flow_slug="default-authentication-flow",
)
)