use Path directly in storage_state

This commit is contained in:
Daniel 2023-12-04 19:07:58 +01:00
parent c02af669fe
commit e33dc95632

View file

@ -31,7 +31,7 @@ def setup_admin_state(context: BrowserContext, dotenv_config: dict[str, str], DI
expect(page.locator("ak-library")).to_be_visible()
# save state
context.storage_state(path=f"{DIR.STATES}/authentik_admin_state.json")
context.storage_state(path=DIR.STATES / "authentik_admin_state.json")
def check_if_user_exists(admin_context: BrowserContext, dotenv_config: dict[str, str]):
@ -116,4 +116,4 @@ def setup_user_state(context: BrowserContext, dotenv_config: dict[str, str], DIR
context.clear_cookies()
create_user(context, invite_link)
context.storage_state(path=f"{DIR.STATES}/authentik_user_state.json")
context.storage_state(path=DIR.STATES / "authentik_user_state.json")