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""" """interfaces API"""
from rest_framework.serializers import ModelSerializer from rest_framework.serializers import ModelSerializer
from rest_framework.viewsets import ModelViewSet 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 from authentik.interfaces.models import Interface

View File

@ -39,8 +39,9 @@ class TesOAuth2DeviceInit(OAuthTestCase):
self.assertEqual( self.assertEqual(
res.url, res.url,
reverse( reverse(
"authentik_core:if-flow", "authentik_interfaces:if",
kwargs={ kwargs={
"if_name": "flow",
"flow_slug": self.device_flow.slug, "flow_slug": self.device_flow.slug,
}, },
), ),
@ -68,8 +69,9 @@ class TesOAuth2DeviceInit(OAuthTestCase):
self.assertEqual( self.assertEqual(
res.url, res.url,
reverse( reverse(
"authentik_core:if-flow", "authentik_interfaces:if",
kwargs={ kwargs={
"if_name": "flow",
"flow_slug": self.provider.authorization_flow.slug, "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") 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.login()
# Get expected token # Get expected token
@ -57,7 +57,7 @@ class TestFlowsAuthenticator(SeleniumTestCase):
"""test TOTP Setup stage""" """test TOTP Setup stage"""
flow: Flow = Flow.objects.get(slug="default-authentication-flow") 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.login()
self.wait_for_url(self.if_user_url("/library")) self.wait_for_url(self.if_user_url("/library"))
@ -103,7 +103,7 @@ class TestFlowsAuthenticator(SeleniumTestCase):
"""test Static OTP Setup stage""" """test Static OTP Setup stage"""
flow: Flow = Flow.objects.get(slug="default-authentication-flow") 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.login()
self.wait_for_url(self.if_user_url("/library")) self.wait_for_url(self.if_user_url("/library"))

View File

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

View File

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