"""Forged-request protection: every unsafe browser request carries the session's token, and every POST form in the templates sends it.""" import pathlib import re from unittest.mock import AsyncMock, patch import pytest import steward from steward.auth import csrf _REPO = pathlib.Path(steward.__file__).parent.parent _FORM_TAG = re.compile(r"
' fixed = '' assert forms_missing_token(broken) == [1] assert forms_missing_token(fixed) == [] assert forms_missing_token('