You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: harden suite after adversarial review (faithfulness + gaps)
Acting on a two-reviewer audit (workflow + Opus-5 advisor):
Faithfulness fixes (tests that could pass against a broken library):
- get_bitstreams embedded-link test used an href byte-identical to the
fallback URL, so it could not distinguish the branches; give it a distinct
href that the fallback could not produce.
- MCP chain fed a link-bearing Bundle to get_bitstreams; the real consumer
round-trips through as_dict() (drops _links) and hits the fallback URL -
rebuild the Bundle from as_dict() and assert the fallback is used.
- export chain fetched policies with action='READ' (raw-client default) but
the real exporter goes through a wrapper defaulting to action=None (no
filter); call with action=None and assert no action param is sent.
- get_resourcepolicy empty test used a no-_embedded body (defensive branch);
the live API returns an _embedded envelope even when empty - use that.
Coverage / stronger assertions:
- get_resourcepolicy action=None omits the filter and returns all actions.
- create_item now asserts the POST body (name/metadata/type/flags), not just
the uuid; create_bitstream asserts the multipart 'properties' payload
(name/bundleName/metadata).
- search_objects result now asserts .as_dict() and links['self']['href'],
the two accessors every consumer reads.
- model tests assert parsed .metadata and checkSum.checkSumAlgorithm (dropped
the tautological hard-set .type assertions' reliance).
- get_bitstreams non-200, and create_item/create_bundle server-error:
characterization tests pinning the current (non-fail-safe) behavior the
consumers depend on, flagged in-comment for a future library hardening.
60 tests, still no network.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments