-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_simple.py
More file actions
29 lines (27 loc) · 833 Bytes
/
test_simple.py
File metadata and controls
29 lines (27 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import requests
import json
url = "http://127.0.0.1:8003/api/recommendations/generate"
data = {
"filename": "travel_vlog_example.mp4",
"metadata": {
"duration": 150,
"width": 1920,
"height": 1080,
"size": 75000000
}
}
print("🧪 Testing simple backend...")
try:
response = requests.post(url, json=data, timeout=10)
print(f"Status: {response.status_code}")
if response.headers.get('content-type', '').startswith('application/json'):
result = response.json()
print(f"Success: {result.get('success')}")
if result.get('success'):
print("✅ Test backend works!")
else:
print(f"❌ Error: {result.get('error')}")
else:
print(f"Non-JSON: {response.text}")
except Exception as e:
print(f"❌ Exception: {e}")