initial comment
This commit is contained in:
30
test-dashboard.py
Normal file
30
test-dashboard.py
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Test if dashboard can be imported and routes are registered"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Set environment variables
|
||||
os.environ['CONFIG_FILE'] = 'C:/Users/ckoch/OneDrive/Documents/development/encoderPro/config-local.yaml'
|
||||
os.environ['STATE_DB'] = 'C:/Users/ckoch/OneDrive/Documents/development/encoderPro/data/state.db'
|
||||
os.environ['LOG_DIR'] = 'C:/Users/ckoch/OneDrive/Documents/development/encoderPro/logs'
|
||||
os.environ['REENCODE_SCRIPT'] = 'C:/Users/ckoch/OneDrive/Documents/development/encoderPro/reencode.py'
|
||||
|
||||
try:
|
||||
print("Importing dashboard module...")
|
||||
import dashboard
|
||||
print("Dashboard module imported successfully")
|
||||
|
||||
print("\nChecking Flask app...")
|
||||
print(f"App: {dashboard.app}")
|
||||
|
||||
print("\nRegistered routes:")
|
||||
for rule in dashboard.app.url_map.iter_rules():
|
||||
print(f" {rule.endpoint:30s} {rule.rule}")
|
||||
|
||||
print(f"\nTotal routes: {len(list(dashboard.app.url_map.iter_rules()))}")
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
Reference in New Issue
Block a user