"""A package, so `from auth.tests import PASSWORD` works wherever pytest is run from, and the two lines every module here needs live in one place rather than in an importable `conftest`. Excluded from the wheel by `pyproject.toml`: a module folder's tests travel with the folder when it is copied into a project, not into an installed app. """ from __future__ import annotations from typing import Any #: Long enough to be a real password and fixed so a failure names it. PASSWORD = "correct-horse-battery" def sign_in(client: Any, password: str = PASSWORD, **body: object) -> Any: """Through the front door, which is a POST and not a form submit: the login page is the only page here and it talks to this endpoint with `fetch`.""" return client.post("/login", json={"password": password, **body})