From 6cfca22168affb9e1e8a19eed50071f858799759 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 30 Nov 2023 12:25:35 +0100 Subject: [PATCH] simplify vars --- src/tests_authentik/fixtures_authentik.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests_authentik/fixtures_authentik.py b/src/tests_authentik/fixtures_authentik.py index 198e189..1d50091 100644 --- a/src/tests_authentik/fixtures_authentik.py +++ b/src/tests_authentik/fixtures_authentik.py @@ -21,9 +21,9 @@ def admin_context(context: BrowserContext, DIR: DirManager) -> BrowserContext: @pytest.fixture def authentik_admin_page(admin_context: BrowserContext, DIR: DirManager) -> Page: page = admin_context.new_page() - authentik_env_file = DIR.ENV_FILES / "authentik" - authentik_config: dict[str, str] = dotenv_values(authentik_env_file) # type: ignore - url = "https://" + authentik_config["DOMAIN"] + env_file = DIR.ENV_FILES / "authentik" + config: dict[str, str] = dotenv_values(env_file) # type: ignore + url = "https://" + config["DOMAIN"] page.goto(url) return page @@ -40,8 +40,8 @@ def user_context(context: BrowserContext, DIR: DirManager) -> BrowserContext: @pytest.fixture def authentik_user_page(user_context: BrowserContext, DIR: DirManager) -> Page: page = user_context.new_page() - authentik_env_file = DIR.ENV_FILES / "authentik" - authentik_config: dict[str, str] = dotenv_values(authentik_env_file) # type: ignore - url = "https://" + authentik_config["DOMAIN"] + env_file = DIR.ENV_FILES / "authentik" + config: dict[str, str] = dotenv_values(env_file) # type: ignore + url = "https://" + config["DOMAIN"] page.goto(url) return page