Files
jobboard/auth/tests/__init__.py
T
WolfandClaude Opus 5.5 9d666d0937 Bring in pipeline, auth, deploy and docs from the boilerplate
roledesk is built on the boilerplate from here on: pipeline 2.0 (queue and
scheduler), auth (one password, sessions, passkeys), the deploy kit and its
docs, plus the coupling and packaging tests. Downstream copies, unedited.

Refreshed from boilerplate/d56949f7d0f6c0bfe5745478e09007bfad67ae87

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 12:29:16 +02:00

21 lines
816 B
Python

"""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})