Skip to content

Commit dadcf25

Browse files
jentykclaude
andcommitted
test(e2e): create product per media test instead of hardcoded id [MPT-22436]
The media service fixtures built their service against the hardcoded product id from e2e_config (catalog.product.id), which had reached its maximum number of media items. MediaService.create then returned 400 Bad Request, failing setup for the sync and async media tests. Point the sync and async media service fixtures at the shared created_product / async_created_product fixtures so each run starts from a freshly created, empty product instead of the shared seeded one. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent a1bcd9d commit dadcf25

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/e2e/catalog/product/media/test_async_media.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77

88
@pytest.fixture
9-
def async_media_service(async_mpt_vendor, product_id):
10-
return async_mpt_vendor.catalog.products.media(product_id)
9+
def async_media_service(async_mpt_vendor, async_created_product):
10+
return async_mpt_vendor.catalog.products.media(async_created_product.id)
1111

1212

1313
@pytest.fixture
14-
def async_vendor_media_service(async_mpt_vendor, product_id):
15-
return async_mpt_vendor.catalog.products.media(product_id)
14+
def async_vendor_media_service(async_mpt_vendor, async_created_product):
15+
return async_mpt_vendor.catalog.products.media(async_created_product.id)
1616

1717

1818
@pytest.fixture

tests/e2e/catalog/product/media/test_sync_media.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77

88
@pytest.fixture
9-
def vendor_media_service(mpt_vendor, product_id):
10-
return mpt_vendor.catalog.products.media(product_id)
9+
def vendor_media_service(mpt_vendor, created_product):
10+
return mpt_vendor.catalog.products.media(created_product.id)
1111

1212

1313
@pytest.fixture

0 commit comments

Comments
 (0)