Skip to content

Commit c3f30f6

Browse files
committed
Fix mypy for integration tests
1 parent e3548f2 commit c3f30f6

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tests/integration/helpers.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
from square.types.address import Address
1010
from square.types.catalog_item import CatalogItem
1111
from square.types.catalog_item_variation import CatalogItemVariation
12-
from square.types.catalog_object import CatalogObject
13-
from square.types.catalog_object_item import CatalogObjectItem
14-
from square.types.catalog_object_item_variation import CatalogObjectItemVariation
12+
from square.types.catalog_object import (
13+
CatalogObject,
14+
CatalogObject_Item,
15+
CatalogObject_ItemVariation,
16+
)
1517
from square.types.location import Location
1618
from square.types.money import Money
1719

@@ -47,7 +49,7 @@ def __init__(self):
4749

4850
def variations(self) -> List[CatalogObject]:
4951
return [
50-
CatalogObjectItemVariation(
52+
CatalogObject_ItemVariation(
5153
type="ITEM_VARIATION",
5254
id="#variation" + str(uuid.uuid4()),
5355
present_at_all_locations=True,
@@ -69,7 +71,7 @@ def new_test_money(amount: int) -> Money:
6971

7072

7173
def create_test_catalog_item(opts: CreateCatalogItemOptions) -> CatalogObject:
72-
return CatalogObjectItem(
74+
return CatalogObject_Item(
7375
type="ITEM",
7476
id="#" + str(uuid.uuid4()),
7577
present_at_all_locations=True,

tests/integration/test_inventory.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
from square.core.api_error import ApiError
88
from square.requests.catalog_item import CatalogItemParams
99
from square.requests.catalog_item_variation import CatalogItemVariationParams
10-
from square.requests.catalog_object_item_variation import (
11-
CatalogObjectItemVariationParams,
12-
)
10+
from square.requests.catalog_object import CatalogObject_ItemVariationParams
1311
from square.types.catalog_item import CatalogItem
1412
from square.types.catalog_object_item import CatalogObjectItem
1513
from square.types.inventory_adjustment import InventoryAdjustment
@@ -49,7 +47,7 @@ def create_catalog_item_variation() -> str:
4947
"price_money": {"amount": 100, "currency": "USD"},
5048
}
5149

52-
variation: CatalogObjectItemVariationParams = {
50+
variation: CatalogObject_ItemVariationParams = {
5351
"type": "ITEM_VARIATION",
5452
"id": "#colombian-coffee",
5553
"present_at_all_locations": True,

0 commit comments

Comments
 (0)