Skip to content

Add contract test suite covering all resource modules - #20

Merged
aaronelliotross merged 2 commits into
mainfrom
add-contract-test-suite
Sep 2, 2026
Merged

Add contract test suite covering all resource modules#20
aaronelliotross merged 2 commits into
mainfrom
add-contract-test-suite

Conversation

@aaronelliotross

@aaronelliotross aaronelliotross commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an HTTP-mocked (responses) pytest suite covering every public method across actionkit/ — connection/retry logic, base HttpMethods behavior, and all resource modules — replacing the previous two tests that only covered pure string/regex helpers (_path(), Users.id()).
  • Adds responses as a dev dependency; shared fixtures live in tests/conftest.py / tests/urls.py.
  • Wires pytest into .github/workflows/ci.yml so the suite is actually gated on PRs, not just present locally.
  • The five pure HttpMethods subclasses with no added logic (signupactions, signuppages, genericpages, donationpages, userfields) don't get dedicated files — their behavior is already exercised by tests/test_httpmethods.py, plus a wiring smoke test in tests/test_actionkit.py.

Bugs found while writing this, filed separately (not fixed here)

Each is pinned with a regression test documenting current behavior, with an inline comment explaining why — not fixed as a side effect of adding tests:

Test plan

  • uv sync --group dev picks up responses without touching runtime dependencies
  • uv run pytest — 199 passed, 0.23s locally
  • Confirm the CI ci job actually runs and reports pytest results once this PR is open

🤖 Generated with Claude Code

aaronelliotross and others added 2 commits September 2, 2026 10:02
Adds HTTP-mocked (responses) pytest coverage for every public method
across actionkit/, replacing the previous two tests that only covered
pure string/regex helpers. Wires pytest into CI so the suite is
actually gated. A few latent bugs surfaced during this work are
pinned with regression tests documenting current (not endorsed)
behavior; see follow-up issues for each.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
"ci" wasn't descriptive once pytest was added alongside the pins
check -- name both the workflow and its job after what they actually
run, and fix the header comment that still claimed the pins check
was the whole job.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aaronelliotross
aaronelliotross merged commit 69c87f3 into main Sep 2, 2026
1 check passed
@aaronelliotross
aaronelliotross deleted the add-contract-test-suite branch September 2, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant