Spaces:
Sleeping
Sleeping
File size: 522 Bytes
8851e1c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | import requests
BASE = "http://localhost:7860"
# Test 1
print("Testing /health...")
r = requests.get(f"{BASE}/health")
print(f"✓ Health: {r.json()}")
# Test 2
print("\nTesting /reset...")
r = requests.post(f"{BASE}/reset")
data = r.json()
print(f"✓ Reset successful. First email from: {data['sender']}")
# Test 3
print("\nTesting /step (RESPOND)...")
r = requests.post(f"{BASE}/step", json={"action": 1})
result = r.json()
print(f"✓ Step successful. Reward: {result['reward']}")
print("\n✅ All tests passed!") |