Add test suite and switch API to lifespan handler
test_entropy.py covers the HMAC-DRBG (determinism, reseed, length,
reseed limit), health checks (random passes, frozen/all-ones/short/
long-run rejected), a bit-balance smoke test on DRBG output, and the
API endpoints including auth gating. All 16 tests pass without a
camera (producer is stubbed).
Switch api.py from the deprecated @app.on_event('startup') to the
lifespan async context manager. Add pytest to requirements.txt.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -3,3 +3,5 @@ opencv-python>=4.8,<5
|
||||
# FastAPI stack for the entropy service (added in the API stage)
|
||||
fastapi>=0.110
|
||||
uvicorn[standard]>=0.29
|
||||
# Test dependencies
|
||||
pytest>=8.0
|
||||
|
||||
Reference in New Issue
Block a user