Files
OSIT-AE-API-FastAPI/tests/integration/test_int_boot_diagnosis.py
Scott Idem b2384f2869 Tests: Reorganize test suite into functional subdirectories
- Categorized scripts into tests/unit/, tests/integration/, tests/e2e/, and tests/tools/.
- Adopted consistent naming prefixes (test_unit_*, test_int_*, test_e2e_*, tool_*).
- Renamed conftest_mock.py to mock_config_helper.py for clarity.
- Updated test_int_boot_diagnosis.py with sys.path setup for root-level execution.
2026-01-16 10:46:19 -05:00

58 lines
1.2 KiB
Python

import sys
import os
# Add project root to path
sys.path.append(os.getcwd())
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 ---")