Fix 5 failing tests: auth config + graduating_class field assertions #75
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#75
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Lineage
plan-2026-03-08-tryout-prep→ Phase 4 (Tryout day)Repo
forgejo_admin/basketball-apiUser Story
As a developer deploying basketball-api
I want all tests to pass on main
So that CI is green and I can build+push a deployable image
Context
5 tests fail on main after recent merges (checkin/uncheckin endpoints + graduating_class).
3 auth tests return 500 instead of 401/403:
The
public_clientfixture intest_tryouts.pydoesn't setapp.state.auth_config. Theconftest.pyclientfixture does (line 83), but the localpublic_clientskips it. Withoutauth_config,pal_e_auth._get_config()raises HTTP 500 "Auth not configured" instead of letting the auth chain return 401.2 field assertion tests missing
graduating_class:PR #71 added
graduating_classto the roster API response model, but theexpected_fieldssets inTestApiCheckInandTestApiAssignNumberweren't updated.File Targets
Files the agent should modify:
tests/test_tryouts.py— fixpublic_clientfixture (addauth_config), addgraduating_classto 2 expected field setsFiles the agent should NOT touch:
src/— no production code changes neededtests/conftest.py— already correctAcceptance Criteria
pytest tests/test_tryouts.py, then all 70 tests pass (0 failures)public_clienthits a protected endpoint, then it returns 401 (not 500)Test Expectations
pytest tests/test_tryouts.py -vConstraints
conftest.pyclientfixture:from basketball_api.main import _auth_config; app.state.auth_config = _auth_configChecklist
Related
westside-basketball— project this affects