Skip to content

Commit f999407

Browse files
committed
Fix mypy errors in test helper
1 parent b1d7470 commit f999407

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

tests/integration/helpers.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
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 CatalogObject, CatalogObject_Item, CatalogObject_ItemVariation
1513
from square.types.location import Location
1614
from square.types.money import Money
1715

@@ -47,7 +45,7 @@ def __init__(self):
4745

4846
def variations(self) -> List[CatalogObject]:
4947
return [
50-
CatalogObjectItemVariation(
48+
CatalogObject_ItemVariation(
5149
type="ITEM_VARIATION",
5250
id="#variation" + str(uuid.uuid4()),
5351
present_at_all_locations=True,
@@ -69,7 +67,7 @@ def new_test_money(amount: int) -> Money:
6967

7068

7169
def create_test_catalog_item(opts: CreateCatalogItemOptions) -> CatalogObject:
72-
return CatalogObjectItem(
70+
return CatalogObject_Item(
7371
type="ITEM",
7472
id="#" + str(uuid.uuid4()),
7573
present_at_all_locations=True,

tests/integration/test_inventory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
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,
10+
from square.requests.catalog_object import (
11+
CatalogObject_ItemVariationParams,
1212
)
1313
from square.types.catalog_item import CatalogItem
1414
from square.types.catalog_object_item import CatalogObjectItem
@@ -49,7 +49,7 @@ def create_catalog_item_variation() -> str:
4949
"price_money": {"amount": 100, "currency": "USD"},
5050
}
5151

52-
variation: CatalogObjectItemVariationParams = {
52+
variation: CatalogObject_ItemVariationParams = {
5353
"type": "ITEM_VARIATION",
5454
"id": "#colombian-coffee",
5555
"present_at_all_locations": True,

0 commit comments

Comments
 (0)