- Timestamp:
- 29 Sep 2016, 06:51:42 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py
r12986 r14202 154 154 contract = createObject('waeup.SampleContract') 155 155 contract.contract_id = u'CON1' 156 customer['contracts'].addContract(contract) 156 157 contract.product_object = self.product 157 158 contract.document_object = self.document … … 160 161 contract.valid_from = datetime.date(2014, 2, 4) 161 162 contract.valid_to = datetime.date(2014, 12, 4) 162 163 customer['contracts'].addContract(contract)164 163 self.contract = contract 165 164 return customer … … 535 534 def test_import_update(self): 536 535 # We perform the same import twice, 537 # the second time in update mode. The number 538 # of warnings must be the same. 536 # the second time in update mode. No record can be imported. 539 537 num, num_warns, fin_file, fail_file = self.processor.doImport( 540 538 self.csv_file, CONTRACT_HEADER_FIELDS,'create') … … 544 542 # There are one record without contract_id and two 545 543 # records with wrong object identifier. 546 self.assertEqual(num_warns,3) 544 # The other 4 records cannot be imported because DOC1 does 545 # not belong to these customers. 546 self.assertEqual(num_warns,7) 547 547 shutil.rmtree(os.path.dirname(fin_file)) 548 548
Note: See TracChangeset for help on using the changeset viewer.