improve docstring

This commit is contained in:
Daniel 2023-12-14 13:33:12 +01:00
parent 9ff1d1a2a0
commit 2b0a79f8f6

View file

@ -21,10 +21,11 @@ def api_request_context(
@pytest.fixture
def check_if_user_exists() -> Callable[[BrowserContext, dict[str, str], BaseUrl], bool]:
"""This is actually a normal function supplied as a fixture. This is because normal imports from tests_authentik is difficult.
tests_authentik is not part of the python environment, so
from ... import function
will most likely fail. However, pytest handles the loading of fixtures from conftest.py automatically, hence we use that to load functions too."""
"""This is actually a normal function supplied by a fixture. We do this, because imports from
tests_authentik are difficult as it is not part of the python environment. We expect
from X import function
to fail here. However, pytest handles the loading of fixtures from conftest.py automatically,
hence we use that to load functions too."""
def inner_check_if_user_exists(admin_context: BrowserContext, env_config: dict[str, str], URL: BaseUrl) -> bool:
# go to admin page