move fixtures
This commit is contained in:
parent
78fafc1e5c
commit
0d6bd2d0f8
2 changed files with 18 additions and 12 deletions
17
recipes/authentik/tests_authentik/conftest.py
Normal file
17
recipes/authentik/tests_authentik/conftest.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from typing import Generator
|
||||
|
||||
import pytest
|
||||
from playwright.sync_api import APIRequestContext, Playwright
|
||||
|
||||
from pytest_abra import DirManager
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def api_request_context(
|
||||
playwright: Playwright,
|
||||
DIR: DirManager,
|
||||
) -> Generator[APIRequestContext, None, None]:
|
||||
state_file = DIR.STATES / "authentik_admin_state.json"
|
||||
request_context = playwright.request.new_context(storage_state=state_file)
|
||||
yield request_context
|
||||
request_context.dispose()
|
||||
Loading…
Add table
Add a link
Reference in a new issue