add assert message
This commit is contained in:
parent
d3e25c5052
commit
e7910a88a5
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ from pytest_abra import BaseUrl, DirManager
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def authentik_admin_context(context: BrowserContext, DIR: DirManager) -> BrowserContext:
|
def authentik_admin_context(context: BrowserContext, DIR: DirManager) -> BrowserContext:
|
||||||
state_file = DIR.STATES / "authentik_admin_state.json"
|
state_file = DIR.STATES / "authentik_admin_state.json"
|
||||||
assert state_file.is_file()
|
assert state_file.is_file(), "authentik setup did not finish successfully"
|
||||||
storage_state = json.loads(state_file.read_bytes())
|
storage_state = json.loads(state_file.read_bytes())
|
||||||
context.add_cookies(storage_state["cookies"])
|
context.add_cookies(storage_state["cookies"])
|
||||||
return context
|
return context
|
||||||
|
|
@ -27,7 +27,7 @@ def authentik_admin_page(authentik_admin_context: BrowserContext, DIR: DirManage
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def authentik_user_context(context: BrowserContext, DIR: DirManager) -> BrowserContext:
|
def authentik_user_context(context: BrowserContext, DIR: DirManager) -> BrowserContext:
|
||||||
state_file = DIR.STATES / "authentik_user_state.json"
|
state_file = DIR.STATES / "authentik_user_state.json"
|
||||||
assert state_file.is_file()
|
assert state_file.is_file(), "authentik setup did not finish successfully"
|
||||||
storage_state = json.loads(state_file.read_bytes())
|
storage_state = json.loads(state_file.read_bytes())
|
||||||
context.add_cookies(storage_state["cookies"])
|
context.add_cookies(storage_state["cookies"])
|
||||||
return context
|
return context
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue