fix: align player detail test with populated_db fixture jersey state #253
No reviewers
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
ldraney/basketball-api!253
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "252-fix-test-fixture-collision-between-jerse"
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?
Summary
PR #250 added jersey fields to the shared
populated_dbfixture (settingjersey_order_status=paidon player1). PR #251 added the player detail endpoint test assertingjersey_order_status == "none"for the same player. Each passed individually but collide when both are on main, failing CI pipeline #254.Changes
tests/test_admin_spa.py: UpdatedTestAdminPlayerDetail.test_returns_player_detailto assertjersey_order_status == "paid"(matching fixture) instead of"none". Added assertions forjersey_option,jersey_size, andjersey_numberfields that were missing from the detail test but present in the fixture.Test Plan
pytest tests/test_admin_spa.py -v-- all 14 tests pass (was 8 failures before fix)ruff format --checkandruff checkpassReview Checklist
Related Notes
QA Review
Scope: 1 file changed, 5 additions, 1 deletion (test-only)
Diff Analysis
The
populated_dbfixture sets player1 with:jersey_option=JerseyOption.reversiblejersey_size=JerseySize.YLjersey_number="23"jersey_order_status=JerseyOrderStatus.paidThe old assertion
assert data["jersey_order_status"] == "none"directly contradicts this fixture state. The fix correctly updates to"paid"and adds the three missing jersey field assertions (jersey_option,jersey_size,jersey_number), improving test coverage.Checklist
Nits
None.
VERDICT: APPROVED