Skip to content

fix: require REST shopping transport in protocol tests - #70

Merged
damaz91 merged 1 commit into
Universal-Commerce-Protocol:mainfrom
ShuoRen-TT:agent/enforce-rest-discovery-transport
Jul 30, 2026
Merged

fix: require REST shopping transport in protocol tests#70
damaz91 merged 1 commit into
Universal-Commerce-Protocol:mainfrom
ShuoRen-TT:agent/enforce-rest-discovery-transport

Conversation

@ShuoRen-TT

Copy link
Copy Markdown
Contributor

Description

The discovery and version-negotiation tests intended to require the shopping
service to use the REST transport, but they wrapped a boolean comparison in
assertIsNotNone. Both True and False are non-None, so a merchant profile
advertising another transport could pass and later be treated as a REST
endpoint.

This change uses an exact equality assertion in both paths. It also aligns the
version-negotiation docstring with the expected 422 Unprocessable Content
response.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Validation

  • Regression profile advertising transport: "mcp" is rejected
  • Positive profile advertising transport: "rest" passes
  • .venv/bin/ruff check .
  • .venv/bin/ruff format --check .
  • Full conformance suite against the Python Flower Shop sample: 68 passed, 1 skipped
  • git diff --check

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • No additional comments are needed for this focused assertion change
  • No documentation update is required
  • My changes generate no new warnings
  • The corrected assertions prove the fix is effective
  • New and existing tests pass locally with my changes
  • No dependent downstream changes are required

@ShuoRen-TT
ShuoRen-TT marked this pull request as ready for review July 29, 2026 12:30
@damaz91 damaz91 added status:needs-triage Signal that the PR is ready for human triage status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Jul 29, 2026
@damaz91
damaz91 merged commit 2af6298 into Universal-Commerce-Protocol:main Jul 30, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants