From 769951505316d6535ef6e57ad4550577ca59d41c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Wed, 20 Sep 2006 09:25:33 +0000 Subject: [PATCH] set source reference when creating document git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10202 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../testERP5BankingMonetaryDestruction.py | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py b/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py index 90b1d54910..da5b354ccf 100644 --- a/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py @@ -263,8 +263,12 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) """ #print self.portal.portal_categories.objectIds() # Monetary Destruction has source(serre) for source, destinat (serre) for destination, and a price coresponding to the sum of banknote of 10000 and of 5000 ( (2*3) * 10000 + (5*7) * 5000 ) - self.monetary_destruction = self.monetary_destruction_module.newContent(id='monetary_destruction_1', portal_type='Monetary Destruction', source_value=self.source, destination_value=None, - source_total_asset_price=110000.0, source_section_value=self.paris) + self.monetary_destruction = self.monetary_destruction_module.newContent(id='monetary_destruction_1', + portal_type='Monetary Destruction', + source_value=self.source, + destination_value=None, + source_total_asset_price=110000.0, + source_section_value=self.paris) # execute tic self.stepTic() # set source reference @@ -289,10 +293,19 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) Create a monetary destruction document and check it """ # Monetary Destruction has source(serre) for source, destinat (serre) for destination, and a price coresponding to the sum of banknote of 10000 and of 5000 ( (2*3) * 10000 + (5*7) * 5000 ) - self.monetary_destruction = self.monetary_destruction_module.newContent(id='monetary_destruction_1', portal_type='Monetary Destruction', source_value=self.source_for_externe, destination_value=None, - source_total_asset_price=110000.0, source_section_value=self.madrid) + self.monetary_destruction = self.monetary_destruction_module.newContent(id='monetary_destruction_1', + portal_type='Monetary Destruction', + source_value=self.source_for_externe, + destination_value=None, + source_total_asset_price=110000.0, + source_section_value=self.madrid) # execute tic self.stepTic() + # set source reference + self.setDocumentSourceReference(self.monetary_destruction) + # check source reference + self.assertNotEqual(self.monetary_destruction.getSourceReference(), '') + self.assertNotEqual(self.monetary_destruction.getSourceReference(), None) # check we have only one monetary destruction self.assertEqual(len(self.monetary_destruction_module.objectValues()), 1) # get the monetary destruction document -- 2.30.9