fix: update 9 tests after opt_out jersey option removal #315

Merged
forgejo_admin merged 1 commit from 310-fix-opt-out-tests into main 2026-04-03 23:27:59 +00:00

Summary

PR #265 removed opt_out as a valid jersey option but 9 tests still sent opt_out, causing 422 errors that block CI and prevent 6 merged PRs from deploying.

Changes

  • tests/test_jersey.py — 3 tests in TestPlayerIdJerseyCheckout: changed from "option": "opt_out" to "option": "reversible" with Stripe mocks and size/number fields. Assertions updated from success is True to checkout_url verification.
  • tests/test_checkout.py — 3 tests in TestPlayerIdCheckoutCreateSession: changed from jersey opt-out product to a new equipment_opt_out_product fixture (non-jersey category, so the jersey opt-out block doesn't fire). Added fixture.
  • tests/test_dual_auth.py — 2 jersey checkout tests: changed to "reversible" with Stripe mocks. 1 checkout create-session test: changed opt_out_product fixture from ProductCategory.jersey to ProductCategory.equipment.

Test Plan

  • pytest tests/test_checkout.py tests/test_dual_auth.py tests/test_jersey.py -v — 95 passed, 0 failed
  • Full suite (excluding 2 pre-existing import errors from unreleased PRs): 751 passed, 16 pre-existing failures in unrelated files

Review Checklist

  • 9 previously failing tests now pass
  • No production code changed -- test data only
  • No opt_out re-added as valid option
  • Full test suite run, no new failures introduced

None -- standalone bug fix.

  • Closes #310
  • Regression from: PR #265 (remove opt-out from jersey ordering)
  • Blocks: #280, #281, #282, #283, #284, #286 (API contract fixes awaiting deployment)
## Summary PR #265 removed `opt_out` as a valid jersey option but 9 tests still sent `opt_out`, causing 422 errors that block CI and prevent 6 merged PRs from deploying. ## Changes - `tests/test_jersey.py` — 3 tests in `TestPlayerIdJerseyCheckout`: changed from `"option": "opt_out"` to `"option": "reversible"` with Stripe mocks and size/number fields. Assertions updated from `success is True` to `checkout_url` verification. - `tests/test_checkout.py` — 3 tests in `TestPlayerIdCheckoutCreateSession`: changed from jersey opt-out product to a new `equipment_opt_out_product` fixture (non-jersey category, so the jersey opt-out block doesn't fire). Added fixture. - `tests/test_dual_auth.py` — 2 jersey checkout tests: changed to `"reversible"` with Stripe mocks. 1 checkout create-session test: changed `opt_out_product` fixture from `ProductCategory.jersey` to `ProductCategory.equipment`. ## Test Plan - `pytest tests/test_checkout.py tests/test_dual_auth.py tests/test_jersey.py -v` — 95 passed, 0 failed - Full suite (excluding 2 pre-existing import errors from unreleased PRs): 751 passed, 16 pre-existing failures in unrelated files ## Review Checklist - [x] 9 previously failing tests now pass - [x] No production code changed -- test data only - [x] No opt_out re-added as valid option - [x] Full test suite run, no new failures introduced ## Related Notes None -- standalone bug fix. ## Related - Closes #310 - Regression from: PR #265 (remove opt-out from jersey ordering) - Blocks: #280, #281, #282, #283, #284, #286 (API contract fixes awaiting deployment)
fix: update 9 tests to use valid jersey options after opt_out removal
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
96a8ce03ea
PR #265 removed opt_out as a valid jersey option but 9 tests still
sent opt_out, causing 422 errors. Changed test_jersey.py tests to use
"reversible" with Stripe mocks, test_checkout.py tests to use a
non-jersey equipment opt-out product, and test_dual_auth.py tests to
use "reversible" with Stripe mocks and a non-jersey opt-out product.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
forgejo_admin deleted branch 310-fix-opt-out-tests 2026-04-03 23:27:59 +00:00
Sign in to join this conversation.
No description provided.