Spaces:
Running
Running
Download tests/test_memory_health.py from Deign86/mathpulse-api-v3test: direct link, hf CLI and curl.
- Browser
- Download file 654 Bytes
-
https://huggingface.co/spaces/Deign86/mathpulse-api-v3test/resolve/main/tests/test_memory_health.py
- Command line
-
hf download hf://spaces/Deign86/mathpulse-api-v3test/tests/test_memory_health.py
-
curl -L -o test_memory_health.py https://huggingface.co/spaces/Deign86/mathpulse-api-v3test/resolve/main/tests/test_memory_health.py
654 Bytes
| """Regression test for issue #161: /api/memory/health 500 NameError. | |
| check_memory_health() used bare `firebase_admin` / `firestore` names and | |
| missed `import time`, crashing with NameError instead of returning a | |
| health payload. It must never raise NameError. | |
| """ | |
| from backend.services.memory_service import check_memory_health | |
| def test_check_memory_health_never_raises_nameerror(): | |
| result = check_memory_health("health_check_regression_probe") | |
| assert "NameError" not in str(result) | |
| assert set(result) >= { | |
| "firestore_available", | |
| "profile_writable", | |
| "active_state_writable", | |
| "session_summary_writable", | |
| } | |