FengShui / backend /test_server_api.py
Jaosub
Deploy to HF Space
5434776
Raw
History Blame Contribute Delete
409 Bytes
from fastapi.testclient import TestClient
import traceback
from main import app
client = TestClient(app)
try:
print("Sending request to /api/analyze...")
response = client.get("/api/analyze?lat=39.9163&lng=116.3972")
print("Response status code:", response.status_code)
print("Response body:", response.text)
except Exception as e:
print("Exception occurred:")
traceback.print_exc()