Commit d0e42af0 authored by Titouan Soulard's avatar Titouan Soulard

erp5_mrp: add test for variation category list

Variation category list for a Transformation Transformed Resource should not
acquire from the Transformation's resource.
parent bcd82831
......@@ -420,7 +420,6 @@ class TestTransformation(TestTransformationMixin, BaseTestUnitConversion):
self.fail("Invalid Transformed Resource: %s" % transformed_resource)
n += 1
def test_resourceIsNotAcquiredOnTransformationLines(self):
'''
We don't want resource define on transformation to be acquired on
......@@ -448,6 +447,29 @@ class TestTransformation(TestTransformationMixin, BaseTestUnitConversion):
'Transformation Transformed Resource')
self.assertEqual(transformed_resource.getResource(), None)
def test_variationCategoryListIsNotAcquiredOnTransformationLines(self):
'''
Variation category list for a Transformation Transformed Resource should
not acquire from the Transformation's resource.
'''
portal = self.getPortalObject()
product_module = portal.getDefaultModule('Product')
transformation_product = product_module.newContent(portal_type='Product')
transformation_product.newContent(portal_type='Product Individual Variation')
transformed_product = product_module.newContent(portal_type='Product')
transformed_product.newContent(portal_type='Product Individual Variation')
transformation = self.createTransformation()
transformation.setResourceValue(transformation_product)
transformation.setVariationBaseCategoryList(['variation'])
transformed_resource = transformation.newContent(portal_type=\
'Transformation Transformed Resource')
transformed_resource.setResourceValue(transformed_product)
self.assertNotEqual(transformed_resource.getVariationCategoryList(), transformation.getVariationCategoryList())
def test_transformation_indexing(self):
target_product = self.portal.product_module.newContent(portal_type='Product')
consumed_product = self.portal.product_module.newContent(portal_type='Product')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment