From 827827b962503bb552adfa74c7b21553f4681d97 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 30 Nov 2023 12:22:19 +0100 Subject: [PATCH] rename authentik context json files --- src/tests_authentik/fixtures_authentik.py | 4 ++-- src/tests_authentik/setup_authentik.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests_authentik/fixtures_authentik.py b/src/tests_authentik/fixtures_authentik.py index e9b467d..198e189 100644 --- a/src/tests_authentik/fixtures_authentik.py +++ b/src/tests_authentik/fixtures_authentik.py @@ -11,7 +11,7 @@ TIMEOUT = 5000 @pytest.fixture def admin_context(context: BrowserContext, DIR: DirManager) -> BrowserContext: - state_file = DIR.STATES / "admin_state.json" + state_file = DIR.STATES / "authentik_admin_state.json" storage_state = json.loads(state_file.read_bytes()) context.add_cookies(storage_state["cookies"]) context.set_default_timeout(TIMEOUT) @@ -30,7 +30,7 @@ def authentik_admin_page(admin_context: BrowserContext, DIR: DirManager) -> Page @pytest.fixture def user_context(context: BrowserContext, DIR: DirManager) -> BrowserContext: - state_file = DIR.STATES / "user_state.json" + state_file = DIR.STATES / "authentik_user_state.json" storage_state = json.loads(state_file.read_bytes()) context.add_cookies(storage_state["cookies"]) context.set_default_timeout(TIMEOUT) diff --git a/src/tests_authentik/setup_authentik.py b/src/tests_authentik/setup_authentik.py index 831a137..ee6cff4 100644 --- a/src/tests_authentik/setup_authentik.py +++ b/src/tests_authentik/setup_authentik.py @@ -34,7 +34,7 @@ def test_create_admin_login(context: BrowserContext, dotenv_config: dict[str, st expect(page.locator("ak-library")).to_be_visible() # save state - context.storage_state(path=f"{DIR.STATES}/admin_state.json") + context.storage_state(path=f"{DIR.STATES}/authentik_admin_state.json") def check_if_user_exists(admin_context: BrowserContext, dotenv_config: dict[str, str]): @@ -107,7 +107,7 @@ def test_create_user_session(context: BrowserContext, dotenv_config: dict[str, s context.set_default_timeout(TIMEOUT) # load admin cookies - state_file = DIR.STATES / "admin_state.json" + state_file = DIR.STATES / "authentik_admin_state.json" storage_state = json.loads(state_file.read_bytes()) context.add_cookies(storage_state["cookies"]) @@ -123,4 +123,4 @@ def test_create_user_session(context: BrowserContext, dotenv_config: dict[str, s context.clear_cookies() create_user(context, invite_link) - context.storage_state(path=f"{DIR.STATES}/user_state.json") + context.storage_state(path=f"{DIR.STATES}/authentik_user_state.json")