From 90761ffa217c5e0bfb4470e922b08379a095e03e Mon Sep 17 00:00:00 2001 From: Albert Sola Date: Wed, 26 Nov 2025 12:39:18 +0000 Subject: [PATCH] MPT-14900 E2E tests for catalog pricing-policies --- .../catalog/pricing_policy_attachments.py | 19 +++-- tests/e2e/catalog/items/test_async_item.py | 2 +- tests/e2e/catalog/items/test_sync_item.py | 2 +- .../pricing_policies/attachments/__init__.py | 0 .../pricing_policies/attachments/conftest.py | 31 ++++++++ .../attachments/test_async_attachment.py | 76 +++++++++++++++++++ .../attachments/test_sync_attachment.py | 59 ++++++++++++++ .../e2e/catalog/pricing_policies/conftest.py | 23 +++++- .../test_async_pricing_policies.py | 8 +- .../test_sync_pricing_policies.py | 20 ----- .../product/documents/test_async_document.py | 4 +- .../product/documents/test_sync_document.py | 4 +- .../item_groups/test_async_item_groups.py | 2 +- .../item_groups/test_sync_item_groups.py | 2 +- .../catalog/product/media/test_async_media.py | 4 +- .../catalog/product/media/test_sync_media.py | 4 +- .../test_async_parameter_groups.py | 2 +- .../test_sync_parameter_groups.py | 2 +- .../catalog/product/terms/test_sync_terms.py | 4 +- .../terms/variants/test_sync_variants.py | 4 +- .../e2e/catalog/product/test_async_product.py | 2 +- .../e2e/catalog/product/test_sync_product.py | 2 +- .../test_pricing_policy_attachments.py | 8 +- 23 files changed, 224 insertions(+), 60 deletions(-) create mode 100644 tests/e2e/catalog/pricing_policies/attachments/__init__.py create mode 100644 tests/e2e/catalog/pricing_policies/attachments/conftest.py create mode 100644 tests/e2e/catalog/pricing_policies/attachments/test_async_attachment.py create mode 100644 tests/e2e/catalog/pricing_policies/attachments/test_sync_attachment.py diff --git a/mpt_api_client/resources/catalog/pricing_policy_attachments.py b/mpt_api_client/resources/catalog/pricing_policy_attachments.py index f237697a..ef27ce3f 100644 --- a/mpt_api_client/resources/catalog/pricing_policy_attachments.py +++ b/mpt_api_client/resources/catalog/pricing_policy_attachments.py @@ -1,14 +1,17 @@ from mpt_api_client.http import AsyncService, Service from mpt_api_client.http.mixins import ( AsyncCollectionMixin, - AsyncFilesOperationsMixin, + AsyncDownloadFileMixin, AsyncModifiableResourceMixin, CollectionMixin, - FilesOperationsMixin, + DownloadFileMixin, ModifiableResourceMixin, ) from mpt_api_client.models import Model -from mpt_api_client.resources.catalog.mixins import ActivatableMixin, AsyncActivatableMixin +from mpt_api_client.resources.catalog.mixins import ( + AsyncCreateFileMixin, + CreateFileMixin, +) class PricingPolicyAttachment(Model): @@ -21,11 +24,13 @@ class PricingPolicyAttachmentsServiceConfig: _endpoint = "/public/v1/catalog/pricing-policies/{pricing_policy_id}/attachments" _model_class = PricingPolicyAttachment _collection_key = "data" + _upload_file_key = "file" + _upload_data_key = "attachment" class PricingPolicyAttachmentsService( - FilesOperationsMixin[PricingPolicyAttachment], - ActivatableMixin[PricingPolicyAttachment], + CreateFileMixin[PricingPolicyAttachment], + DownloadFileMixin[PricingPolicyAttachment], ModifiableResourceMixin[PricingPolicyAttachment], CollectionMixin[PricingPolicyAttachment], Service[PricingPolicyAttachment], @@ -35,8 +40,8 @@ class PricingPolicyAttachmentsService( class AsyncPricingPolicyAttachmentsService( - AsyncFilesOperationsMixin[PricingPolicyAttachment], - AsyncActivatableMixin[PricingPolicyAttachment], + AsyncCreateFileMixin[PricingPolicyAttachment], + AsyncDownloadFileMixin[PricingPolicyAttachment], AsyncModifiableResourceMixin[PricingPolicyAttachment], AsyncCollectionMixin[PricingPolicyAttachment], AsyncService[PricingPolicyAttachment], diff --git a/tests/e2e/catalog/items/test_async_item.py b/tests/e2e/catalog/items/test_async_item.py index fa104f88..9f9a4c89 100644 --- a/tests/e2e/catalog/items/test_async_item.py +++ b/tests/e2e/catalog/items/test_async_item.py @@ -7,7 +7,7 @@ @pytest.fixture -async def async_created_item(logger, async_mpt_vendor, item_data): +async def async_created_item(async_mpt_vendor, item_data): service = async_mpt_vendor.catalog.items item = await service.create(item_data) yield item diff --git a/tests/e2e/catalog/items/test_sync_item.py b/tests/e2e/catalog/items/test_sync_item.py index e952489b..3f70e678 100644 --- a/tests/e2e/catalog/items/test_sync_item.py +++ b/tests/e2e/catalog/items/test_sync_item.py @@ -7,7 +7,7 @@ @pytest.fixture -def created_item(logger, mpt_vendor, item_data): +def created_item(mpt_vendor, item_data): service = mpt_vendor.catalog.items item = service.create(item_data) yield item diff --git a/tests/e2e/catalog/pricing_policies/attachments/__init__.py b/tests/e2e/catalog/pricing_policies/attachments/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/e2e/catalog/pricing_policies/attachments/conftest.py b/tests/e2e/catalog/pricing_policies/attachments/conftest.py new file mode 100644 index 00000000..303c72b6 --- /dev/null +++ b/tests/e2e/catalog/pricing_policies/attachments/conftest.py @@ -0,0 +1,31 @@ +import pytest + +from mpt_api_client.exceptions import MPTAPIError + + +@pytest.fixture +def attachment_id(created_attachment): + return created_attachment.id + + +@pytest.fixture +def attachment_data(): + return { + "name": "e2e test attachment - please delete", + "description": "E2E test attachment for automated testing", + } + + +@pytest.fixture +def attachment_service(mpt_ops, pricing_policy_id): + return mpt_ops.catalog.pricing_policies.attachments(pricing_policy_id) + + +@pytest.fixture +def created_attachment(attachment_service, attachment_data, pdf_fd): + attachment = attachment_service.create(attachment_data, file=pdf_fd) + yield attachment + try: + attachment_service.delete(attachment.id) + except MPTAPIError as error: + print(f"TEARDOWN - Unable to delete attachment {attachment.id}: {error.title}") diff --git a/tests/e2e/catalog/pricing_policies/attachments/test_async_attachment.py b/tests/e2e/catalog/pricing_policies/attachments/test_async_attachment.py new file mode 100644 index 00000000..4874acc7 --- /dev/null +++ b/tests/e2e/catalog/pricing_policies/attachments/test_async_attachment.py @@ -0,0 +1,76 @@ +import pytest + +from mpt_api_client.exceptions import MPTAPIError +from mpt_api_client.rql.query_builder import RQLQuery + +pytestmark = [pytest.mark.flaky] + + +@pytest.fixture +def async_attachment_service(async_mpt_ops, pricing_policy_id): + return async_mpt_ops.catalog.pricing_policies.attachments(pricing_policy_id) + + +@pytest.fixture +async def created_attachment_async(async_attachment_service, attachment_data, pdf_fd): + attachment = await async_attachment_service.create(attachment_data, file=pdf_fd) + yield attachment + try: + await async_attachment_service.delete(attachment.id) + except MPTAPIError as error: + print(f"TEARDOWN - Unable to delete attachment {attachment.id}: {error.title}") + + +def test_create_attachment_async(created_attachment_async, attachment_data): + result = created_attachment_async + + assert result.name == attachment_data["name"] + assert result.description == attachment_data["description"] + + +async def test_update_attachment_async(async_attachment_service, created_attachment_async): + update_data = {"name": "Updated e2e test attachment - please delete"} + + result = await async_attachment_service.update(created_attachment_async.id, update_data) + + assert result.name == update_data["name"] + + +async def test_get_attachment_async(async_attachment_service, attachment_id): + result = await async_attachment_service.get(attachment_id) + + assert result.id == attachment_id + + +async def test_download_attachment_async(async_attachment_service, attachment_id): + result = await async_attachment_service.download(attachment_id) + + assert result.file_contents is not None + assert result.filename == "empty.pdf" + + +async def test_iterate_attachments_async(async_attachment_service, created_attachment_async): + result = [att async for att in async_attachment_service.iterate()] + + assert any(att.id == created_attachment_async.id for att in result) + + +async def test_filter_attachments_async(async_attachment_service, created_attachment_async): + filtered_service = async_attachment_service.filter(RQLQuery(id=created_attachment_async.id)) + + result = [att async for att in filtered_service.iterate()] + + assert len(result) == 1 + assert result[0].id == created_attachment_async.id + + +async def test_not_found_async(async_attachment_service): + with pytest.raises(MPTAPIError): + await async_attachment_service.get("ATT-000-000-000") + + +async def test_delete_attachment_async(async_attachment_service, created_attachment_async): + await async_attachment_service.delete(created_attachment_async.id) + + with pytest.raises(MPTAPIError): + await async_attachment_service.get(created_attachment_async.id) diff --git a/tests/e2e/catalog/pricing_policies/attachments/test_sync_attachment.py b/tests/e2e/catalog/pricing_policies/attachments/test_sync_attachment.py new file mode 100644 index 00000000..1ccf5721 --- /dev/null +++ b/tests/e2e/catalog/pricing_policies/attachments/test_sync_attachment.py @@ -0,0 +1,59 @@ +import pytest + +from mpt_api_client.exceptions import MPTAPIError +from mpt_api_client.rql.query_builder import RQLQuery + +pytestmark = [pytest.mark.flaky] + + +def test_create_attachment(created_attachment, attachment_data): + result = created_attachment + + assert result.name == attachment_data["name"] + assert result.description == attachment_data["description"] + + +def test_update_attachment(attachment_service, created_attachment): + update_data = {"name": "Updated e2e test attachment - please delete"} + + result = attachment_service.update(created_attachment.id, update_data) + + assert result.name == update_data["name"] + + +def test_get_attachment(attachment_service, attachment_id): + result = attachment_service.get(attachment_id) + + assert result.id == attachment_id + + +def test_download_attachment(attachment_service, attachment_id): + result = attachment_service.download(attachment_id) + + assert result.file_contents is not None + assert result.filename == "empty.pdf" + + +def test_iterate_attachments(attachment_service, created_attachment): + result = list(attachment_service.iterate()) + + assert any(att.id == created_attachment.id for att in result) + + +def test_filter_attachments(attachment_service, created_attachment): + result = list(attachment_service.filter(RQLQuery(id=created_attachment.id)).iterate()) + + assert len(result) == 1 + assert result[0].id == created_attachment.id + + +def test_not_found(attachment_service): + with pytest.raises(MPTAPIError): + attachment_service.get("ATT-000-000-000") + + +def test_delete_attachment(attachment_service, created_attachment): + attachment_service.delete(created_attachment.id) + + with pytest.raises(MPTAPIError): + attachment_service.get(created_attachment.id) diff --git a/tests/e2e/catalog/pricing_policies/conftest.py b/tests/e2e/catalog/pricing_policies/conftest.py index 9cdcef9c..79f069a2 100644 --- a/tests/e2e/catalog/pricing_policies/conftest.py +++ b/tests/e2e/catalog/pricing_policies/conftest.py @@ -1,5 +1,7 @@ import pytest +from mpt_api_client.exceptions import MPTAPIError + @pytest.fixture def buyer_id(e2e_config): @@ -19,5 +21,22 @@ def pricing_policy_data(buyer_id, product_id): @pytest.fixture -def pricing_policy_id(e2e_config): - return e2e_config.get("catalog.pricing_policy.id") +def pricing_policies_service(mpt_ops): + return mpt_ops.catalog.pricing_policies + + +@pytest.fixture +def created_pricing_policy(pricing_policies_service, pricing_policy_data): + policy = pricing_policies_service.create(pricing_policy_data) + + yield policy + + try: + pricing_policies_service.delete(policy.id) + except MPTAPIError as error: + print(f"TEARDOWN - Unable to delete pricing policy {policy.id}: {error.title}") + + +@pytest.fixture +def pricing_policy_id(created_pricing_policy): + return created_pricing_policy.id diff --git a/tests/e2e/catalog/pricing_policies/test_async_pricing_policies.py b/tests/e2e/catalog/pricing_policies/test_async_pricing_policies.py index f41c5f2f..49e7c317 100644 --- a/tests/e2e/catalog/pricing_policies/test_async_pricing_policies.py +++ b/tests/e2e/catalog/pricing_policies/test_async_pricing_policies.py @@ -35,12 +35,10 @@ async def test_get_pricing_policy(async_pricing_policies_service, async_created_ assert result.id == async_created_pricing_policy.id -async def test_get_pricing_policy_by_id( - async_pricing_policies_service, async_created_pricing_policy -): - result = await async_pricing_policies_service.get(async_created_pricing_policy.id) +async def test_get_pricing_policy_by_id(async_pricing_policies_service, pricing_policy_id): + result = await async_pricing_policies_service.get(pricing_policy_id) - assert result.id == async_created_pricing_policy.id + assert result.id == pricing_policy_id async def test_iterate_pricing_policies( diff --git a/tests/e2e/catalog/pricing_policies/test_sync_pricing_policies.py b/tests/e2e/catalog/pricing_policies/test_sync_pricing_policies.py index 64ac8539..07283300 100644 --- a/tests/e2e/catalog/pricing_policies/test_sync_pricing_policies.py +++ b/tests/e2e/catalog/pricing_policies/test_sync_pricing_policies.py @@ -6,23 +6,6 @@ pytestmark = [pytest.mark.flaky] -@pytest.fixture -def pricing_policies_service(mpt_ops): - return mpt_ops.catalog.pricing_policies - - -@pytest.fixture -def created_pricing_policy(pricing_policies_service, pricing_policy_data): - policy = pricing_policies_service.create(pricing_policy_data) - - yield policy - - try: - pricing_policies_service.delete(policy.id) - except MPTAPIError as error: - print(f"TEARDOWN - Unable to delete pricing policy {policy.id}: {error.title}") - - def test_create_pricing_policy(created_pricing_policy, pricing_policy_data): result = created_pricing_policy @@ -36,9 +19,6 @@ def test_get_pricing_policy(pricing_policies_service, created_pricing_policy): def test_get_pricing_policy_by_id(pricing_policies_service, pricing_policy_id): - if not pricing_policy_id: - pytest.skip("No pricing_policy_id configured") - result = pricing_policies_service.get(pricing_policy_id) assert result.id == pricing_policy_id diff --git a/tests/e2e/catalog/product/documents/test_async_document.py b/tests/e2e/catalog/product/documents/test_async_document.py index f8c15148..4524fb5c 100644 --- a/tests/e2e/catalog/product/documents/test_async_document.py +++ b/tests/e2e/catalog/product/documents/test_async_document.py @@ -12,7 +12,7 @@ def async_document_service(async_mpt_vendor, product_id): @pytest.fixture -async def created_document_from_file_async(logger, async_document_service, document_data, pdf_fd): +async def created_document_from_file_async(async_document_service, document_data, pdf_fd): document_data["documenttype"] = "File" document = await async_document_service.create(document_data, file=pdf_fd) yield document @@ -23,7 +23,7 @@ async def created_document_from_file_async(logger, async_document_service, docum @pytest.fixture -async def created_document_from_link_async(logger, async_document_service, document_data, pdf_url): +async def created_document_from_link_async(async_document_service, document_data, pdf_url): document_data["url"] = pdf_url document = await async_document_service.create(document_data) yield document diff --git a/tests/e2e/catalog/product/documents/test_sync_document.py b/tests/e2e/catalog/product/documents/test_sync_document.py index 2283813a..70971762 100644 --- a/tests/e2e/catalog/product/documents/test_sync_document.py +++ b/tests/e2e/catalog/product/documents/test_sync_document.py @@ -7,7 +7,7 @@ @pytest.fixture -def created_document_from_file(logger, vendor_document_service, document_data, pdf_fd): +def created_document_from_file(vendor_document_service, document_data, pdf_fd): document_data["documenttype"] = "File" document = vendor_document_service.create(document_data, pdf_fd) yield document @@ -18,7 +18,7 @@ def created_document_from_file(logger, vendor_document_service, document_data, p @pytest.fixture -def created_document_from_url(logger, vendor_document_service, document_data, pdf_url): +def created_document_from_url(vendor_document_service, document_data, pdf_url): document_data["url"] = pdf_url document = vendor_document_service.create(document_data) yield document diff --git a/tests/e2e/catalog/product/item_groups/test_async_item_groups.py b/tests/e2e/catalog/product/item_groups/test_async_item_groups.py index a0174d2d..e6e62358 100644 --- a/tests/e2e/catalog/product/item_groups/test_async_item_groups.py +++ b/tests/e2e/catalog/product/item_groups/test_async_item_groups.py @@ -7,7 +7,7 @@ @pytest.fixture -async def async_created_item_group(logger, async_mpt_vendor, product_id, item_group_data): +async def async_created_item_group(async_mpt_vendor, product_id, item_group_data): service = async_mpt_vendor.catalog.products.item_groups(product_id) group = await service.create(item_group_data) yield group diff --git a/tests/e2e/catalog/product/item_groups/test_sync_item_groups.py b/tests/e2e/catalog/product/item_groups/test_sync_item_groups.py index 87afd306..170ca0f6 100644 --- a/tests/e2e/catalog/product/item_groups/test_sync_item_groups.py +++ b/tests/e2e/catalog/product/item_groups/test_sync_item_groups.py @@ -7,7 +7,7 @@ @pytest.fixture -def created_item_group(logger, mpt_vendor, product_id, item_group_data): +def created_item_group(mpt_vendor, product_id, item_group_data): service = mpt_vendor.catalog.products.item_groups(product_id) group = service.create(item_group_data) yield group diff --git a/tests/e2e/catalog/product/media/test_async_media.py b/tests/e2e/catalog/product/media/test_async_media.py index f60f3e44..ffdd3599 100644 --- a/tests/e2e/catalog/product/media/test_async_media.py +++ b/tests/e2e/catalog/product/media/test_async_media.py @@ -16,7 +16,7 @@ def async_vendor_media_service(async_mpt_vendor, product_id): @pytest.fixture -async def created_media_from_file_async(logger, async_media_service, media_data, test_media_file): +async def created_media_from_file_async(async_media_service, media_data, test_media_file): media = await async_media_service.create(media_data, test_media_file) yield media try: @@ -26,7 +26,7 @@ async def created_media_from_file_async(logger, async_media_service, media_data, @pytest.fixture -async def created_media_from_url_async(logger, async_media_service, media_data, jpg_url): +async def created_media_from_url_async(async_media_service, media_data, jpg_url): media_data["url"] = jpg_url media = await async_media_service.create(media_data) yield media diff --git a/tests/e2e/catalog/product/media/test_sync_media.py b/tests/e2e/catalog/product/media/test_sync_media.py index 2956d074..0794574e 100644 --- a/tests/e2e/catalog/product/media/test_sync_media.py +++ b/tests/e2e/catalog/product/media/test_sync_media.py @@ -11,7 +11,7 @@ def vendor_media_service(mpt_vendor, product_id): @pytest.fixture -def created_media_from_file(logger, vendor_media_service, media_data, test_media_file): +def created_media_from_file(vendor_media_service, media_data, test_media_file): media = vendor_media_service.create(media_data, test_media_file) yield media try: @@ -21,7 +21,7 @@ def created_media_from_file(logger, vendor_media_service, media_data, test_media @pytest.fixture -def created_media_from_url(logger, vendor_media_service, media_data, jpg_url): +def created_media_from_url(vendor_media_service, media_data, jpg_url): media_data["url"] = jpg_url media = vendor_media_service.create(media_data) yield media diff --git a/tests/e2e/catalog/product/parameter_groups/test_async_parameter_groups.py b/tests/e2e/catalog/product/parameter_groups/test_async_parameter_groups.py index 564392e6..078f324d 100644 --- a/tests/e2e/catalog/product/parameter_groups/test_async_parameter_groups.py +++ b/tests/e2e/catalog/product/parameter_groups/test_async_parameter_groups.py @@ -4,7 +4,7 @@ @pytest.fixture -async def async_created_parameter_group(logger, async_mpt_vendor, product_id, parameter_group_data): +async def async_created_parameter_group(async_mpt_vendor, product_id, parameter_group_data): service = async_mpt_vendor.catalog.products.parameter_groups(product_id) group = await service.create(parameter_group_data) yield group diff --git a/tests/e2e/catalog/product/parameter_groups/test_sync_parameter_groups.py b/tests/e2e/catalog/product/parameter_groups/test_sync_parameter_groups.py index d8655c8e..836a66e5 100644 --- a/tests/e2e/catalog/product/parameter_groups/test_sync_parameter_groups.py +++ b/tests/e2e/catalog/product/parameter_groups/test_sync_parameter_groups.py @@ -4,7 +4,7 @@ @pytest.fixture -def created_parameter_group(logger, mpt_vendor, product_id, parameter_group_data): +def created_parameter_group(mpt_vendor, product_id, parameter_group_data): service = mpt_vendor.catalog.products.parameter_groups(product_id) group = service.create(parameter_group_data) yield group diff --git a/tests/e2e/catalog/product/terms/test_sync_terms.py b/tests/e2e/catalog/product/terms/test_sync_terms.py index e7573a56..b1faddbc 100644 --- a/tests/e2e/catalog/product/terms/test_sync_terms.py +++ b/tests/e2e/catalog/product/terms/test_sync_terms.py @@ -12,7 +12,7 @@ def vendor_terms_service(mpt_vendor, product_id): @pytest.fixture -def created_term(logger, vendor_terms_service, term_data): +def created_term(vendor_terms_service, term_data): service = vendor_terms_service term = service.create(term_data) yield term @@ -23,7 +23,7 @@ def created_term(logger, vendor_terms_service, term_data): @pytest.fixture -def created_term_from_url(logger, vendor_terms_service, term_data, pdf_url): +def created_term_from_url(vendor_terms_service, term_data, pdf_url): term_data["url"] = pdf_url service = vendor_terms_service term = service.create(term_data) diff --git a/tests/e2e/catalog/product/terms/variants/test_sync_variants.py b/tests/e2e/catalog/product/terms/variants/test_sync_variants.py index 7fec0dee..b457f984 100644 --- a/tests/e2e/catalog/product/terms/variants/test_sync_variants.py +++ b/tests/e2e/catalog/product/terms/variants/test_sync_variants.py @@ -12,7 +12,7 @@ def vendor_variant_service(mpt_vendor, product_id, term_id): @pytest.fixture -def created_variant(logger, vendor_variant_service, variant_data, pdf_fd): +def created_variant(vendor_variant_service, variant_data, pdf_fd): variant = vendor_variant_service.create(variant_data, pdf_fd) yield variant try: @@ -22,7 +22,7 @@ def created_variant(logger, vendor_variant_service, variant_data, pdf_fd): @pytest.fixture -def created_variant_from_url(logger, vendor_variant_service, variant_data, pdf_url): +def created_variant_from_url(vendor_variant_service, variant_data, pdf_url): variant_data["type"] = "Online" variant_data["assetUrl"] = pdf_url variant = vendor_variant_service.create(variant_data) diff --git a/tests/e2e/catalog/product/test_async_product.py b/tests/e2e/catalog/product/test_async_product.py index 5abab202..842c2bcd 100644 --- a/tests/e2e/catalog/product/test_async_product.py +++ b/tests/e2e/catalog/product/test_async_product.py @@ -5,7 +5,7 @@ @pytest.fixture -async def async_created_product(logger, async_mpt_vendor, product_data, logo_fd): +async def async_created_product(async_mpt_vendor, product_data, logo_fd): product = await async_mpt_vendor.catalog.products.create(product_data, icon=logo_fd) yield product diff --git a/tests/e2e/catalog/product/test_sync_product.py b/tests/e2e/catalog/product/test_sync_product.py index da9de00a..a42e14e0 100644 --- a/tests/e2e/catalog/product/test_sync_product.py +++ b/tests/e2e/catalog/product/test_sync_product.py @@ -5,7 +5,7 @@ @pytest.fixture -def created_product(logger, mpt_vendor, product_data, logo_fd): +def created_product(mpt_vendor, product_data, logo_fd): product = mpt_vendor.catalog.products.create(product_data, icon=logo_fd) yield product diff --git a/tests/unit/resources/catalog/test_pricing_policy_attachments.py b/tests/unit/resources/catalog/test_pricing_policy_attachments.py index a8bf3874..4e926d83 100644 --- a/tests/unit/resources/catalog/test_pricing_policy_attachments.py +++ b/tests/unit/resources/catalog/test_pricing_policy_attachments.py @@ -40,18 +40,14 @@ def test_async_endpoint(async_pricing_policy_attachments_service) -> None: assert result is True -@pytest.mark.parametrize( - "method", ["get", "create", "delete", "update", "download", "activate", "deactivate"] -) +@pytest.mark.parametrize("method", ["get", "create", "delete", "update", "download"]) def test_methods_present(pricing_policy_attachments_service, method: str) -> None: result = hasattr(pricing_policy_attachments_service, method) assert result is True -@pytest.mark.parametrize( - "method", ["get", "create", "delete", "update", "download", "activate", "deactivate"] -) +@pytest.mark.parametrize("method", ["get", "create", "delete", "update", "download"]) def test_async_methods_present(async_pricing_policy_attachments_service, method: str) -> None: result = hasattr(async_pricing_policy_attachments_service, method)