first commit
This commit is contained in:
33
scripts/smoke_test.py
Normal file
33
scripts/smoke_test.py
Normal file
@@ -0,0 +1,33 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user