fix(marketing): add template_folder + tighten blueprint registration tests

- Explicit template_folder on marketing/billing/legal blueprints prevents silent
  template fallback in Phase 2
- Replace vacuous test assertions (len>=0, substring '/' in r) with direct
  url_prefix and exact-match route checks (per code review I-1, I-2, I-3)
This commit is contained in:
Allison
2026-04-27 16:21:34 -04:00
parent e01523125e
commit 55ae09431d
4 changed files with 32 additions and 19 deletions

View File

@@ -8,4 +8,10 @@ Routes added in Tasks B-2.7 (checkout) and B-2.8 (webhook).
"""
from flask import Blueprint
billing_bp = Blueprint('billing', __name__, url_prefix='/checkout')
billing_bp = Blueprint(
'billing',
__name__,
url_prefix='/checkout',
template_folder='../../templates/billing',
static_folder=None,
)

View File

@@ -8,4 +8,10 @@ Routes added in Task B-2.9.
"""
from flask import Blueprint
legal_bp = Blueprint('legal', __name__, url_prefix='/legal')
legal_bp = Blueprint(
'legal',
__name__,
url_prefix='/legal',
template_folder='../../templates/legal',
static_folder=None,
)

View File

@@ -5,7 +5,12 @@ blueprints. Routes added incrementally in Phase 2 (Tasks A-2.x).
"""
from flask import Blueprint
marketing_bp = Blueprint('marketing', __name__)
marketing_bp = Blueprint(
'marketing',
__name__,
template_folder='../../templates/marketing',
static_folder=None,
)
# Import routes module so it registers route handlers via decorators
from . import routes # noqa: E402,F401