Spaces:
Sleeping
Sleeping
Download tests/test_brainstorm.py from DvorakInnovationAI/GenAI-FASTAPI: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/spaces/DvorakInnovationAI/GenAI-FASTAPI/resolve/main/tests/test_brainstorm.py
- Command line
-
hf download hf://spaces/DvorakInnovationAI/GenAI-FASTAPI/tests/test_brainstorm.py
-
curl -L -o test_brainstorm.py https://huggingface.co/spaces/DvorakInnovationAI/GenAI-FASTAPI/resolve/main/tests/test_brainstorm.py
549 Bytes
| from fastapi.testclient import TestClient | |
| from api.main import app | |
| client = TestClient(app) | |
| def test_brainstorming(): | |
| payload = { | |
| "preferred_topics": [], | |
| "image_base64_list": [] | |
| } | |
| response = client.post("/api/brainstorm", json=payload) | |
| assert response.status_code == 200 | |
| def test_brainstorming_with_topics(): | |
| payload = { | |
| "preferred_topics": ["fitness","community"], | |
| "image_base64_list": [] | |
| } | |
| response = client.post("/api/brainstorm", json=payload) | |
| assert response.status_code == 200 |