Spaces:
Sleeping
Sleeping
Download _test_fastapi.py from garvitsachdeva/911: direct link, hf CLI and curl.
- Browser
- Download file 442 Bytes
-
https://huggingface.co/spaces/garvitsachdeva/911/resolve/main/_test_fastapi.py
- Command line
-
hf download hf://spaces/garvitsachdeva/911/_test_fastapi.py
-
curl -L -o _test_fastapi.py https://huggingface.co/spaces/garvitsachdeva/911/resolve/main/_test_fastapi.py
442 Bytes
| from fastapi.testclient import TestClient | |
| from src.server.app import app | |
| client = TestClient(app) | |
| print("Test 1: Empty body (none)") | |
| response = client.post("/reset") | |
| print("Status:", response.status_code) | |
| print("Data:", response.json()) | |
| print("\nTest 2: null body string") | |
| response = client.post("/reset", content="null", headers={"Content-Type": "application/json"}) | |
| print("Status:", response.status_code) | |
| print("Data:", response.json()) | |