コード例 #1
0
ファイル: test_product.py プロジェクト: ronreiter/saleor
def test_update_variants_changed_does_nothing_with_no_attributes():
    product_type = MagicMock(spec=ProductType)
    product_type.variant_attributes.all = Mock(return_value=[])
    saved_attributes = []
    assert update_variants_names(product_type, saved_attributes) is None
コード例 #2
0
ファイル: test_product.py プロジェクト: elwoodxblues/saleor
def test_update_variants_changed_does_nothing_with_no_attributes():
    product_type = MagicMock(spec=ProductType)
    product_type.variant_attributes.all = Mock(return_value=[])
    saved_attributes = []
    assert update_variants_names(product_type, saved_attributes) is None