marketplace refactoring
This commit is contained in:
6
tests/fixtures/shop_fixtures.py
vendored
6
tests/fixtures/shop_fixtures.py
vendored
@@ -80,7 +80,7 @@ def verified_shop(db, other_user):
|
||||
def shop_product(db, test_shop, unique_product):
|
||||
"""Create a shop product relationship"""
|
||||
shop_product = ShopProduct(
|
||||
shop_id=test_shop.id, product_id=unique_product.id, is_active=True
|
||||
shop_id=test_shop.id, marketplace_product_id=unique_product.id, is_active=True
|
||||
)
|
||||
# Add optional fields if they exist in your model
|
||||
if hasattr(ShopProduct, "shop_price"):
|
||||
@@ -97,11 +97,11 @@ def shop_product(db, test_shop, unique_product):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def test_stock(db, test_product, test_shop):
|
||||
def test_stock(db, test_marketplace_product, test_shop):
|
||||
"""Create test stock entry"""
|
||||
unique_id = str(uuid.uuid4())[:8].upper() # Short unique identifier
|
||||
stock = Stock(
|
||||
gtin=test_product.gtin, # Use gtin instead of product_id
|
||||
gtin=test_marketplace_product.gtin, # Use gtin instead of marketplace_product_id
|
||||
location=f"WAREHOUSE_A_{unique_id}",
|
||||
quantity=10,
|
||||
reserved_quantity=0,
|
||||
|
||||
Reference in New Issue
Block a user