Repository navigation
Sprint 4 PR 4.6b — integration tests for recurring-series router - #240
Merged
Merged
Conversation
Summary: Continues PR 4.6b file-by-file revival of the integration tier. Adds real-HTTP coverage for /api/v1/recurring-series across create, preview, list, get, per-series occurrence listing, template update, and cascade delete. Changed files: - tests/integration/test_recurring_events.py (new) — 16 tests spanning create/preview/list/get/occurrences/update/delete, covering: admin gate on all writes, cross-org 403, preview endpoint works for volunteer, envelope shape on list, occurrence_sequence ordering on the /occurrences endpoint, cascade delete count assertion, 404 on missing. Validation: - poetry run pytest tests/integration/test_recurring_events.py -v — 16 passed - poetry run black tests/integration/test_recurring_events.py — clean - poetry run ruff check tests/integration/test_recurring_events.py — clean - No OpenAPI snapshot refresh (no endpoints added or changed). Follow-ups: - Remaining integration files to revive: assignments, audit, analytics, calendar, password_reset, solutions, solver, people, webhooks.
tomqwu
marked this pull request as ready for review
July 19, 2026 13:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Continues Sprint 4 PR 4.6b (file-by-file revival of the
tests/integration/tier). Adds a production-endpoint integration file that drives the/recurring-seriesrouter over real HTTP against the session-scoped uvicornapi_serverfixture. Covers the full lifecycle: create + occurrence generation, dry-run preview, list envelope, per-series occurrence listing, template update, and cascade delete.Coverage
tests/integration/test_recurring_events.py— 16 tests covering:POST /recurring-series— weekly-Monday series creates + generates 4 occurrences, admin gate (volunteer 403), cross-org 403POST /recurring-series/preview— returns pattern occurrences (sequence starts at 1), works for volunteers (read-only endpoint)GET /recurring-series— envelope shape, org scoping, cross-org 403GET /recurring-series/{id}— success + 404GET /recurring-series/{id}/occurrences— occurrence_sequence order preservedPUT /recurring-series/{id}— title + location update (admin), volunteer 403, 404DELETE /recurring-series/{id}— cascade removes series + occurrences (occurrences_deleted: 3verified), admin gate, 404Validation
poetry run pytest tests/integration/test_recurring_events.py -v— 16 passedpoetry run black tests/integration/test_recurring_events.py— cleanpoetry run ruff check tests/integration/test_recurring_events.py— cleanNo OpenAPI snapshot refresh (no endpoints added or changed).
Notes
start_datesits 14+ days in the future to avoid tripping thevalidate_series_durationpast-window guard.occurrences_deletedcount (not just a soft "series is gone" check), so a regression where the loop misses events would be caught.Follow-ups
Remaining routers still to revive under
tests/integration/: assignments, audit, analytics, calendar, password_reset, solutions, solver, people, webhooks.Generated by Claude Code