Changeset 12054 for main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests
- Timestamp:
- 25 Nov 2014, 11:29:42 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/sample_document_data.csv
r12005 r12054 1 document_id,reg_number,title2 d3,1,My first doc3 d4,2,My second doc4 d5,3,My third doc5 ,1,My 4th doc6 d5,2,My stolen doc1 classname,document_id,reg_number,title 2 CustomerDocument,d3,1,My first doc 3 CustomerDocument,d4,2,My second doc 4 CustomerDocument,d5,3,My third doc 5 CustomerDocument,,1,My 4th doc 6 CustomerDocument,d5,2,My stolen doc -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_batching.py
r12006 r12054 318 318 def test_checkConversion(self): 319 319 errs, inv_errs, conv_dict = self.processor.checkConversion( 320 dict(document_id='d1266236341955' ))320 dict(document_id='d1266236341955', classname='CustomerDocument')) 321 321 self.assertEqual(len(errs),0) 322 322 errs, inv_errs, conv_dict = self.processor.checkConversion( 323 dict(document_id='nonsense' ))323 dict(document_id='nonsense', classname='CustomerDocument')) 324 324 self.assertEqual(len(errs),1) 325 325 timestamp = ("%d" % int(time()*10000))[1:] 326 326 document_id = "d%s" % timestamp 327 327 errs, inv_errs, conv_dict = self.processor.checkConversion( 328 dict(document_id=document_id ))328 dict(document_id=document_id, classname='CustomerDocument')) 329 329 self.assertEqual(len(errs),0) 330 errs, inv_errs, conv_dict = self.processor.checkConversion( 331 dict(document_id=document_id, classname='WrongDocument')) 332 self.assertEqual(len(errs),1) 330 333 331 334 def test_import(self): … … 336 339 fail_file = open(fail_file).read() 337 340 self.assertEqual(fail_file, 338 ' reg_number,document_id,title,--ERRORS--\r\n'339 ' 2,d5,My stolen doc,document_id: id exists\r\n')341 'classname,reg_number,document_id,title,--ERRORS--\r\n' 342 'CustomerDocument,2,d5,My stolen doc,document_id: id exists\r\n') 340 343 document = self.processor.getEntry(dict(reg_number='1', 341 344 document_id='d3'), self.app)
Note: See TracChangeset for help on using the changeset viewer.