Repository navigation
Sprint 4 PR 4.6b — integration tests for people router - #235
Merged
Merged
Conversation
Summary: extend the resurrected tests/integration/ tier with an integration file that drives the /people router over real HTTP against the session-scoped uvicorn api_server fixture. Covers /me (get, update, unauthenticated 403), admin-only create (success, forbidden for volunteer, duplicate id 409), admin-only bulk import (success, missing items 400, forbidden for volunteer), list envelope + q= search across name/email + role filter, get one + 404, PUT with self-vs-admin tenancy and no-role-escalation guard, and admin-only delete. Changed files: tests/integration/test_people.py (new, 19 tests) Validation: poetry run pytest tests/integration/ -q # 129 passed poetry run pytest tests/integration/test_people.py -v # 19 passed poetry run pytest tests/unit -q # 342 passed, 21 skipped poetry run black tests/integration/test_people.py poetry run ruff check tests/integration/test_people.py Follow-ups: continue file-by-file revival with constraints, conflicts, calendar, and solutions routers.
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 an integration file that drives the/peoplerouter over real HTTP against the session-scoped uvicornapi_serverfixture.Coverage
tests/integration/test_people.py— 19 tests covering:GET /people/me— success, unauthenticated 403PUT /people/me— self-edit for name and timezonePOST /people/— success, admin gate (403 for volunteer), duplicate id 409POST /people/bulk— JSON-array success, missingitems400, admin gateGET /people/— envelope shape,q=name/email search,role=filterGET /people/{id}— success + 404PUT /people/{id}— admin can edit other in org, volunteer cannot edit others (403), volunteer cannot escalate own roles to admin (403)DELETE /people/{id}— admin delete + follow-up 404, admin gateValidation
poetry run pytest tests/integration/— 129 passed (was 110)poetry run pytest tests/integration/test_people.py -v— 19 passedpoetry run pytest tests/unit -q— 342 passed, 21 skippedpoetry run black tests/integration/test_people.py— cleanpoetry run ruff check tests/integration/test_people.py— cleanNo OpenAPI snapshot refresh (no endpoints added or changed).
Notes
api_serversession fixture from PR 4.6a.q=test searches for the admin's local-part which is unique to the fixture, so the assertion doesn't collide with other tests' emails.admin.Follow-ups
Next integration files to revive: constraints, conflicts, calendar, solutions.
Generated by Claude Code