fix: test fixture collision between jersey fields and player detail assertions #252

Closed
opened 2026-03-29 21:48:31 +00:00 by forgejo_admin · 0 comments
Contributor

Type

Bug

Lineage

Standalone — discovered during CI pipeline #254 failure after merging PRs #250 and #251.

Repo

forgejo_admin/basketball-api

What Broke

CI pipeline #254 fails with:

FAILED tests/test_admin_spa.py::TestAdminPlayerDetail::test_returns_player_detail
AssertionError: assert 'paid' == 'none'

PR #250 added jersey fields to the populated_db fixture, setting jersey_order_status=JerseyOrderStatus.paid on player1. PR #251 added the player detail endpoint test asserting jersey_order_status == "none" for the same player. Each PR passed individually but collide when merged together.

Repro Steps

  1. Run pytest tests/test_admin_spa.py::TestAdminPlayerDetail::test_returns_player_detail -v
  2. Observe: assertion fails because jersey_order_status is "paid" (from fixture) but test expects "none"

Expected Behavior

The detail test should assert jersey_order_status == "paid" to match what the populated_db fixture actually sets for player1. All tests in test_admin_spa.py should pass.

Environment

  • Cluster/namespace: CI
  • Service version/commit: main after merging #250 and #251
  • Related alerts: Woodpecker pipeline #254 failure

Acceptance Criteria

  • pytest tests/test_admin_spa.py -v passes with no failures
  • Detail test assertions match the populated_db fixture state
  • forgejo_admin/basketball-api #250 — PR that added jersey fields to fixture
  • forgejo_admin/basketball-api #251 — PR that added player detail endpoint with wrong assertion
### Type Bug ### Lineage Standalone — discovered during CI pipeline #254 failure after merging PRs #250 and #251. ### Repo `forgejo_admin/basketball-api` ### What Broke CI pipeline #254 fails with: ``` FAILED tests/test_admin_spa.py::TestAdminPlayerDetail::test_returns_player_detail AssertionError: assert 'paid' == 'none' ``` PR #250 added jersey fields to the `populated_db` fixture, setting `jersey_order_status=JerseyOrderStatus.paid` on player1. PR #251 added the player detail endpoint test asserting `jersey_order_status == "none"` for the same player. Each PR passed individually but collide when merged together. ### Repro Steps 1. Run `pytest tests/test_admin_spa.py::TestAdminPlayerDetail::test_returns_player_detail -v` 2. Observe: assertion fails because `jersey_order_status` is `"paid"` (from fixture) but test expects `"none"` ### Expected Behavior The detail test should assert `jersey_order_status == "paid"` to match what the `populated_db` fixture actually sets for player1. All tests in `test_admin_spa.py` should pass. ### Environment - Cluster/namespace: CI - Service version/commit: main after merging #250 and #251 - Related alerts: Woodpecker pipeline #254 failure ### Acceptance Criteria - [ ] `pytest tests/test_admin_spa.py -v` passes with no failures - [ ] Detail test assertions match the `populated_db` fixture state ### Related - `forgejo_admin/basketball-api #250` — PR that added jersey fields to fixture - `forgejo_admin/basketball-api #251` — PR that added player detail endpoint with wrong assertion
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/basketball-api#252
No description provided.