This repository has been archived on 2026-08-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ROCm-Research-Archive/_TestScripts/Scripts and Tests/_test_route3.py
T
2026-08-20 00:45:43 +02:00

29 lines
894 B
Python

from app import app
with app.test_request_context('/api/voices'):
try:
from app import api_voices
result = api_voices()
print("RESULT TYPE:", type(result))
if isinstance(result, tuple):
print("STATUS:", result[1] if len(result) > 1 else "no status")
print("CONTENT:", result[0][:200] if result[0] else "empty")
else:
print("RESULT:", result)
except Exception as e:
print(f"EXCEPTION: {type(e).__name__}: {e}")
import traceback
traceback.print_exc()
# Also test with test client but with more detail
print("\n--- Test Client ---")
c = app.test_client()
r = c.get('/api/voices')
print(f"Status: {r.status_code}")
print(f"Headers: {dict(r.headers)}")
# Test a working endpoint for comparison
print("\n--- /api/runtime ---")
r2 = c.get('/api/runtime')
print(f"Status: {r2.status_code}")