Files
OSIT-AE-API-FastAPI/tests/diagnose_boot.py
Scott Idem d321b94395 chore(tests): organize test scripts and beautify account creation email
- Moved scattered Python test scripts from root and 'admin/development/' to 'tests/'.
- Beautified the HTML email body for account creation links in 'app/methods/person_methods.py' with a modern responsive design.
2026-01-15 14:38:00 -05:00

55 lines
1.2 KiB
Python

import sys
import os
print("--- Starting Import Diagnosis ---")
try:
print("1. Importing app.config...")
from app import config
print(f" Success. Settings found: {hasattr(config, 'settings')}")
except Exception as e:
print(f" FAILED: {e}")
sys.exit(1)
try:
print("2. Importing app.log...")
import app.log
print(" Success.")
except Exception as e:
print(f" FAILED: {e}")
import traceback
traceback.print_exc()
sys.exit(1)
try:
print("3. Importing app.db_connection...")
import app.db_connection
print(" Success.")
except Exception as e:
print(f" FAILED: {e}")
import traceback
traceback.print_exc()
sys.exit(1)
try:
print("4. Importing app.db_sql...")
import app.db_sql
print(" Success.")
except Exception as e:
print(f" FAILED: {e}")
import traceback
traceback.print_exc()
sys.exit(1)
try:
print("5. Importing app.main...")
import app.main
print(" Success.")
except Exception as e:
print(f" FAILED: {e}")
import traceback
traceback.print_exc()
sys.exit(1)
print("--- Diagnosis Complete: No top-level import errors found in local env ---")