Skip to content

Commit 3c15f02

Browse files
authored
MPT-16242 Add iterate in expected methods for catalog resources (#150)
2 parents 231c8e1 + f87a613 commit 3c15f02

16 files changed

Lines changed: 78 additions & 32 deletions

tests/unit/resources/catalog/test_authorizations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ def async_authorizations_service(async_http_client):
1616
return AsyncAuthorizationsService(http_client=async_http_client)
1717

1818

19-
@pytest.mark.parametrize("method", ["get", "create", "update", "delete"])
19+
@pytest.mark.parametrize("method", ["get", "create", "update", "delete", "iterate"])
2020
def test_mixins_present(authorizations_service, method):
2121
result = hasattr(authorizations_service, method)
2222

2323
assert result is True
2424

2525

26-
@pytest.mark.parametrize("method", ["get", "create", "update", "delete"])
26+
@pytest.mark.parametrize("method", ["get", "create", "update", "delete", "iterate"])
2727
def test_async_mixins_present(async_authorizations_service, method):
2828
result = hasattr(async_authorizations_service, method)
2929

tests/unit/resources/catalog/test_items.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@ def async_items_service(async_http_client):
1414

1515

1616
@pytest.mark.parametrize(
17-
"method", ["get", "create", "update", "delete", "review", "publish", "unpublish"]
17+
"method",
18+
[
19+
"get",
20+
"create",
21+
"update",
22+
"delete",
23+
"review",
24+
"publish",
25+
"unpublish",
26+
"iterate",
27+
],
1828
)
1929
def test_mixins_present(items_service, method):
2030
result = hasattr(items_service, method)
@@ -23,7 +33,17 @@ def test_mixins_present(items_service, method):
2333

2434

2535
@pytest.mark.parametrize(
26-
"method", ["get", "create", "update", "delete", "review", "publish", "unpublish"]
36+
"method",
37+
[
38+
"get",
39+
"create",
40+
"update",
41+
"delete",
42+
"review",
43+
"publish",
44+
"unpublish",
45+
"iterate",
46+
],
2747
)
2848
def test_async_mixins_present(async_items_service, method):
2949
result = hasattr(async_items_service, method)

tests/unit/resources/catalog/test_listings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ def async_listings_service(async_http_client):
1616
return AsyncListingsService(http_client=async_http_client)
1717

1818

19-
@pytest.mark.parametrize("method", ["get", "create", "update", "delete"])
19+
@pytest.mark.parametrize("method", ["get", "create", "update", "delete", "iterate"])
2020
def test_mixins_present(listings_service, method):
2121
result = hasattr(listings_service, method)
2222

2323
assert result is True
2424

2525

26-
@pytest.mark.parametrize("method", ["get", "create", "update", "delete"])
26+
@pytest.mark.parametrize("method", ["get", "create", "update", "delete", "iterate"])
2727
def test_async_mixins_present(async_listings_service, method):
2828
result = hasattr(async_listings_service, method)
2929

tests/unit/resources/catalog/test_price_list_items.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ def async_test_endpoint(async_price_list_items_service):
3636
assert result is True
3737

3838

39-
@pytest.mark.parametrize("method", ["get", "update"])
39+
@pytest.mark.parametrize("method", ["get", "update", "iterate"])
4040
def test_methods_present(price_list_items_service, method):
4141
result = hasattr(price_list_items_service, method)
4242

4343
assert result is True
4444

4545

46-
@pytest.mark.parametrize("method", ["get", "update"])
46+
@pytest.mark.parametrize("method", ["get", "update", "iterate"])
4747
def test_async_methods_present(async_price_list_items_service, method):
4848
result = hasattr(async_price_list_items_service, method)
4949

tests/unit/resources/catalog/test_price_lists.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ def async_price_lists_service(http_client):
2020
return AsyncPriceListsService(http_client=http_client)
2121

2222

23-
@pytest.mark.parametrize("method", ["get", "create", "update", "delete"])
23+
@pytest.mark.parametrize("method", ["get", "create", "update", "delete", "iterate"])
2424
def test_mixins_present(price_lists_service, method):
2525
result = hasattr(price_lists_service, method)
2626

2727
assert result is True
2828

2929

30-
@pytest.mark.parametrize("method", ["get", "create", "update", "delete"])
30+
@pytest.mark.parametrize("method", ["get", "create", "update", "delete", "iterate"])
3131
def test_async_mixins_present(async_price_lists_service, method):
3232
result = hasattr(async_price_lists_service, method)
3333

tests/unit/resources/catalog/test_pricing_policies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_async_property_services(
144144

145145
@pytest.mark.parametrize(
146146
"method",
147-
["get", "create", "update", "delete", "activate", "disable"],
147+
["get", "create", "update", "delete", "activate", "disable", "iterate"],
148148
)
149149
def test_mixins_present(pricing_policies_service, method):
150150
result = hasattr(pricing_policies_service, method)
@@ -154,7 +154,7 @@ def test_mixins_present(pricing_policies_service, method):
154154

155155
@pytest.mark.parametrize(
156156
"method",
157-
["get", "create", "update", "delete", "activate", "disable"],
157+
["get", "create", "update", "delete", "activate", "disable", "iterate"],
158158
)
159159
def test_async_mixins_present(async_pricing_policies_service, method):
160160
result = hasattr(async_pricing_policies_service, method)

tests/unit/resources/catalog/test_pricing_policy_attachments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ def test_async_endpoint(async_pricing_policy_attachments_service) -> None:
4040
assert result is True
4141

4242

43-
@pytest.mark.parametrize("method", ["get", "create", "delete", "update", "download"])
43+
@pytest.mark.parametrize("method", ["get", "create", "delete", "update", "download", "iterate"])
4444
def test_methods_present(pricing_policy_attachments_service, method: str) -> None:
4545
result = hasattr(pricing_policy_attachments_service, method)
4646

4747
assert result is True
4848

4949

50-
@pytest.mark.parametrize("method", ["get", "create", "delete", "update", "download"])
50+
@pytest.mark.parametrize("method", ["get", "create", "delete", "update", "download", "iterate"])
5151
def test_async_methods_present(async_pricing_policy_attachments_service, method: str) -> None:
5252
result = hasattr(async_pricing_policy_attachments_service, method)
5353

tests/unit/resources/catalog/test_product_term_variants.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def test_async_endpoint(async_term_variant_service: AsyncTermVariantService) ->
4141

4242

4343
@pytest.mark.parametrize(
44-
"method", ["get", "create", "delete", "update", "download", "review", "publish", "unpublish"]
44+
"method",
45+
["get", "create", "delete", "update", "download", "review", "publish", "unpublish", "iterate"],
4546
)
4647
def test_methods_present(term_variant_service: TermVariantService, method: str) -> None:
4748
result = hasattr(term_variant_service, method)
@@ -50,7 +51,8 @@ def test_methods_present(term_variant_service: TermVariantService, method: str)
5051

5152

5253
@pytest.mark.parametrize(
53-
"method", ["get", "create", "delete", "update", "download", "review", "publish", "unpublish"]
54+
"method",
55+
["get", "create", "delete", "update", "download", "review", "publish", "unpublish", "iterate"],
5456
)
5557
def test_async_methods_present(
5658
async_term_variant_service: AsyncTermVariantService, method: str

tests/unit/resources/catalog/test_product_terms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_async_endpoint(async_term_service: AsyncTermService) -> None:
3737

3838

3939
@pytest.mark.parametrize(
40-
"method", ["get", "create", "delete", "update", "review", "publish", "unpublish"]
40+
"method", ["get", "create", "delete", "update", "review", "publish", "unpublish", "iterate"]
4141
)
4242
def test_methods_present(term_service: TermService, method: str) -> None:
4343
result = hasattr(term_service, method)
@@ -46,7 +46,7 @@ def test_methods_present(term_service: TermService, method: str) -> None:
4646

4747

4848
@pytest.mark.parametrize(
49-
"method", ["get", "create", "delete", "update", "review", "publish", "unpublish"]
49+
"method", ["get", "create", "delete", "update", "review", "publish", "unpublish", "iterate"]
5050
)
5151
def test_async_methods_present(async_term_service: AsyncTermService, method: str) -> None:
5252
result = hasattr(async_term_service, method)

tests/unit/resources/catalog/test_products.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,17 @@ def async_products_service(async_http_client):
4949

5050
@pytest.mark.parametrize(
5151
"method",
52-
["get", "create", "update", "delete", "review", "publish", "unpublish", "update_settings"],
52+
[
53+
"get",
54+
"create",
55+
"update",
56+
"delete",
57+
"review",
58+
"publish",
59+
"unpublish",
60+
"update_settings",
61+
"iterate",
62+
],
5363
)
5464
def test_mixins_present(products_service, method):
5565
result = hasattr(products_service, method)
@@ -59,7 +69,17 @@ def test_mixins_present(products_service, method):
5969

6070
@pytest.mark.parametrize(
6171
"method",
62-
["get", "create", "update", "delete", "review", "publish", "unpublish", "update_settings"],
72+
[
73+
"get",
74+
"create",
75+
"update",
76+
"delete",
77+
"review",
78+
"publish",
79+
"unpublish",
80+
"update_settings",
81+
"iterate",
82+
],
6383
)
6484
def test_async_mixins_present(async_products_service, method):
6585
result = hasattr(async_products_service, method)

0 commit comments

Comments
 (0)