Commit caa159ea authored by Fabien Morin's avatar Fabien Morin

check it's possible to define source_reference/destination_reference on

sale/purchase/internal_supply_line

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32618 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f0c80283
......@@ -1095,6 +1095,34 @@ class TestResource(ERP5TypeTestCase):
new_resource.getDefaultSaleSupplyLineValue().getResourceValue()
)
def test_sourceDestinationReferenceOnSupplyLineOnDefaultSupplyLine(self):
'''Check that it's possible to set and get a source/destination_reference
on default supply line
'''
resource = self.portal.getDefaultModule(self.product_portal_type)\
.newContent(portal_type=self.product_portal_type)
resource.edit(\
purchase_supply_line_source_reference='test_source_reference_on_purchase_supply_line',
purchase_supply_line_destination_reference='test_destination_reference_on_purchase_supply_line',
sale_supply_line_source_reference='test_source_reference_on_sale_supply_line',
sale_supply_line_destination_reference='test_destination_reference_on_sale_supply_line',
internal_supply_line_source_reference='test_source_reference_on_internal_supply_line',
internal_supply_line_destination_reference='test_destination_reference_on_internal_supply_line',
)
self.assertEquals(resource.getPurchaseSupplyLineSourceReference(),
'test_source_reference_on_purchase_supply_line')
self.assertEquals(resource.getPurchaseSupplyLineDestinationReference(),
'test_destination_reference_on_purchase_supply_line')
self.assertEquals(resource.getSaleSupplyLineSourceReference(),
'test_source_reference_on_sale_supply_line')
self.assertEquals(resource.getSaleSupplyLineDestinationReference(),
'test_destination_reference_on_sale_supply_line')
self.assertEquals(resource.getInternalSupplyLineSourceReference(),
'test_source_reference_on_internal_supply_line')
self.assertEquals(resource.getInternalSupplyLineDestinationReference(),
'test_destination_reference_on_internal_supply_line')
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestResource))
......
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