Files
Fossign/scripts/smoke_test.py
2026-01-23 13:54:58 +01:00

34 lines
786 B
Python

import os
import sys
# Ensure repo root is on sys.path when running as a script.
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
if ROOT not in sys.path:
sys.path.insert(0, ROOT)
from app import create_app
def main():
app = create_app()
rules = sorted({str(r) for r in app.url_map.iter_rules()})
print("App created:", app.name)
print("Routes:")
for r in rules:
print(" -", r)
required = {
"/admin/companies/<int:company_id>/delete",
"/auth/change-password",
"/auth/forgot-password",
"/auth/reset-password/<token>",
}
missing = sorted(required.difference(rules))
if missing:
raise SystemExit(f"Missing expected routes: {missing}")
if __name__ == "__main__":
main()