forked from 0xWheatyz/SPARC
Add JWT auth tests: registration, login, protected routes, and admin endpoints #946
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Existing tests in
tests/test_api.pybypass authentication entirely. There is no coverage of the JWT flow, leaving critical auth and authorization logic untested.Task
Add a new test file (e.g.
tests/test_auth.py) or extend the existing one to cover:Acceptance Criteria
Reference
Roadmap: P1 Test coverage for auth and admin.
Triaged by repo manager. This issue has already been resolved in the current codebase.
tests/test_auth.pyexists covering JWT registration, login, protected route access, token handling, and admin-only endpoints.tests/test_security.pyalso exists with additional security test coverage. The CI workflow runs pytest. Closing as already implemented.