Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse files- .pytest_cache/v/cache/lastfailed +3 -2
- .pytest_cache/v/cache/nodeids +3 -0
- pytest.ini +3 -0
- verify_api.py +35 -0
.pytest_cache/v/cache/lastfailed
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
"
|
|
|
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"test_sequential_thinking.py::test_sequential_thinking": true,
|
| 3 |
+
"test_comm_fallback.py::test_jules_comm_fallbacks": true,
|
| 4 |
+
"test_models.py::test_persona_models": true
|
| 5 |
}
|
.pytest_cache/v/cache/nodeids
CHANGED
|
@@ -1,3 +1,6 @@
|
|
| 1 |
[
|
|
|
|
|
|
|
|
|
|
| 2 |
"test_sequential_thinking.py::test_sequential_thinking"
|
| 3 |
]
|
|
|
|
| 1 |
[
|
| 2 |
+
"test_comm_fallback.py::test_jules_comm_fallbacks",
|
| 3 |
+
"test_injector.py::test_tool_injector",
|
| 4 |
+
"test_models.py::test_persona_models",
|
| 5 |
"test_sequential_thinking.py::test_sequential_thinking"
|
| 6 |
]
|
pytest.ini
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[pytest]
|
| 2 |
+
asyncio_mode = auto
|
| 3 |
+
asyncio_default_fixture_loop_scope = function
|
verify_api.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import time
|
| 3 |
+
import subprocess
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
def test_api_endpoints():
|
| 7 |
+
print("Starting application in background...")
|
| 8 |
+
env = os.environ.copy()
|
| 9 |
+
env["GITHUB_TOKEN"] = "mock_token"
|
| 10 |
+
# Run app.py in background
|
| 11 |
+
process = subprocess.Popen(["python3", "app.py"], env=env)
|
| 12 |
+
|
| 13 |
+
# Wait for startup
|
| 14 |
+
time.sleep(10)
|
| 15 |
+
|
| 16 |
+
try:
|
| 17 |
+
print("Testing /health endpoint...")
|
| 18 |
+
res = requests.get("http://localhost:7860/health")
|
| 19 |
+
print(f"Status: {res.status_code}, Body: {res.json()}")
|
| 20 |
+
assert res.status_code == 200
|
| 21 |
+
assert res.json()["status"] == "ok"
|
| 22 |
+
|
| 23 |
+
print("Testing /api/info endpoint...")
|
| 24 |
+
res = requests.get("http://localhost:7860/api/info")
|
| 25 |
+
print(f"Status: {res.status_code}, Body: {res.json()}")
|
| 26 |
+
assert res.status_code == 200
|
| 27 |
+
assert "UX Analysis Orchestrator" in res.json()["app"]
|
| 28 |
+
|
| 29 |
+
print("API tests PASSED!")
|
| 30 |
+
finally:
|
| 31 |
+
print("Killing application...")
|
| 32 |
+
process.terminate()
|
| 33 |
+
|
| 34 |
+
if __name__ == "__main__":
|
| 35 |
+
test_api_endpoints()
|