Spaces:
Running
Running
Download test_fastapi_docs.py from Leon4gr45/needle: direct link, hf CLI and curl.
- Browser
- Download file 280 Bytes
-
https://huggingface.co/spaces/Leon4gr45/needle/resolve/main/test_fastapi_docs.py
- Command line
-
hf download hf://spaces/Leon4gr45/needle/test_fastapi_docs.py
-
curl -L -o test_fastapi_docs.py https://huggingface.co/spaces/Leon4gr45/needle/resolve/main/test_fastapi_docs.py
280 Bytes
| import asyncio | |
| from fastapi.testclient import TestClient | |
| from gateway import app | |
| client = TestClient(app) | |
| def test_docs_url(): | |
| response = client.get("/api-docs") | |
| assert response.status_code == 200 | |
| if __name__ == "__main__": | |
| test_docs_url() | |
| print("Test passed") | |