Skip to content

test(rest/python): adapt checkout fixture to ucp-sdk 0.4.6 - #219

Open
WenshuangQuan-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
WenshuangQuan-TT:codex/fix-python-shipping-destination-request
Open

test(rest/python): adapt checkout fixture to ucp-sdk 0.4.6#219
WenshuangQuan-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
WenshuangQuan-TT:codex/fix-python-shipping-destination-request

Conversation

@WenshuangQuan-TT

@WenshuangQuan-TT WenshuangQuan-TT commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

Problem

The shared checkout payload fixture in rest/python/server/integration_test.py builds a FulfillmentMethodCreateRequest with the response model ShippingDestination.

A fresh sync currently resolves ucp-sdk 0.4.6. Its generated destinations field validates operation-specific request models, so passing ShippingDestination raises a Pydantic ValidationError before any HTTP request is sent. This breaks the Python integration tests that reuse _create_checkout_payload.

Change

Import and construct ShippingDestinationCreateRequest in the checkout-create fixture so the nested model matches FulfillmentMethodCreateRequest.destinations.

This is a test-fixture compatibility fix only. It does not change merchant-server runtime behavior, protocol schemas, or API responses.

Category (Required)

  • Core Protocol
  • Governance/Contributing
  • Capability
  • Documentation
  • Infrastructure
  • Maintenance
  • SDK
  • Samples / Conformance
  • UCP Schema
  • Community Health (.github)

Related Issues

None.

Verification

Focused reproduction with ucp-sdk 0.4.6:

baseline ShippingDestination: ValidationError
fixed ShippingDestinationCreateRequest: accepted

Full local checks:

pytest -q
245 passed, 3 warnings, 12 subtests passed

ruff check integration_test.py
ruff format --check integration_test.py
git diff --check

Checklist

  • I followed the contributing guide and used a Conventional Commits title.
  • Documentation is not applicable because this only changes a test fixture.
  • Local linting and formatting checks pass.
  • Existing integration tests directly reproduce and verify the fix.
  • New and existing tests pass locally.
  • Schema changes and SDK model regeneration are not applicable.

@WenshuangQuan-TT WenshuangQuan-TT changed the title test(rest/python): use create model for shipping destinations test(rest/python): adapt checkout fixture to ucp-sdk 0.4.6 Aug 27, 2026
@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Aug 27, 2026
@carolinerg1 carolinerg1 added status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Aug 28, 2026
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