test(mocked): assert request bodies and 204/_seg on remaining write verbs - #202
Merged
millsmillsymills merged 1 commit intoJun 24, 2026
Merged
Conversation
…erbs
Harden three write-tool mocked tests that omitted contract assertions
present on sibling verbs:
- gandi_livedns_create_tsig_key: assert the POST body is `{}`.
- gandi_cert_update_tags: add a 204 No Content case asserting `{}`.
- gandi_livedns_replace_named_records: add a percent-encoding parity
case asserting the PUT path is `.../records/a%2Fb`.
No source changes; pure test hardening.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
millsmillsymills
deleted the
test/issue-198-write-tool-body-seg-contracts
branch
June 24, 2026 19:13
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
Test-only hardening. Three mocked write-tool tests had a contract assertion that their sibling verbs already make but they themselves omitted. This adds parity so every verb in each file asserts the same request-body / 204 /
_segpercent-encoding contracts. No source changes.Changes
tests/mocked/test_livedns_dnssec_tsig_writes.py—gandi_livedns_create_tsig_keynow asserts the POST body is{}(mirrors the restore test's{"deleted": False}assertion).tests/mocked/test_cert_tag_writes.py— addtest_handles_204for the PATCH path (gandi_cert_update_tags), matching the existing 204 cases on the PUT/DELETE paths.tests/mocked/test_livedns_record_subresource_writes.py— add a percent-encoding parity case forgandi_livedns_replace_named_records(PUT/records/{name}) asserting the path is.../records/a%2Fb, matching the create/delete/typed cases.Verification
uv run pytest tests/mocked/test_livedns_dnssec_tsig_writes.py tests/mocked/test_cert_tag_writes.py tests/mocked/test_livedns_record_subresource_writes.py -v→ 31 passed.uv run ruff check/ruff format --check/ty checkall clean.Closes #198
🤖 Generated with Claude Code