Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions rest/python/server/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@
from ucp_sdk.models.schemas.shopping.types import (
payment_instrument as payment_instr_type,
)
from ucp_sdk.models.schemas.shopping.ap2_mandate import Checkout as Ap2Checkout
from ucp_sdk.models.schemas.shopping.buyer_consent import (
from ucp_sdk.models.schemas.shopping.ap2_mandate.dev.ucp.shopping import (
Checkout as Ap2Checkout,
)
from ucp_sdk.models.schemas.shopping.buyer_consent.dev.ucp.shopping import (
Checkout as BuyerConsentCheckoutResp,
)
from ucp_sdk.models.schemas.shopping.discount import (
from ucp_sdk.models.schemas.shopping.discount.dev.ucp.shopping import (
Checkout as DiscountCheckoutResp,
)
from ucp_sdk.models.schemas.shopping.fulfillment import (
from ucp_sdk.models.schemas.shopping.fulfillment.dev.ucp.shopping import (
Checkout as FulfillmentCheckout,
)
from ucp_sdk.models.schemas.shopping.order import PlatformSchema
Expand Down
14 changes: 8 additions & 6 deletions rest/python/server/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@
"""

from typing import Any
from ucp_sdk.models.schemas.shopping.ap2_mandate import Checkout as Ap2Checkout
from ucp_sdk.models.schemas.shopping.buyer_consent import (
from ucp_sdk.models.schemas.shopping.ap2_mandate.dev.ucp.shopping import (
Checkout as Ap2Checkout,
)
from ucp_sdk.models.schemas.shopping.buyer_consent.dev.ucp.shopping import (
Checkout as BuyerConsentCheckoutResp,
)
from ucp_sdk.models.schemas.shopping.discount import (
from ucp_sdk.models.schemas.shopping.discount import DiscountsObject
from ucp_sdk.models.schemas.shopping.discount.dev.ucp.shopping import (
Checkout as DiscountCheckoutResp,
DiscountsObject,
)
from ucp_sdk.models.schemas.shopping.fulfillment import (
from ucp_sdk.models.schemas.shopping.fulfillment import Fulfillment
from ucp_sdk.models.schemas.shopping.fulfillment.dev.ucp.shopping import (
Checkout as FulfillmentCheckout,
Fulfillment,
)

from ucp_sdk.models.schemas.shopping.order import Order
Expand Down
29 changes: 29 additions & 0 deletions rest/python/server/server_import_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2026 UCP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Smoke tests for the sample server module."""

import importlib
from pathlib import Path
import sys


def test_server_module_imports(monkeypatch) -> None:
"""The sample server should import with the current Python SDK models."""
monkeypatch.syspath_prepend(str(Path(__file__).parent))
sys.modules.pop("server", None)

server = importlib.import_module("server")

assert server.app is not None
Loading