Changeset 9302
- Timestamp:
- 5 Oct 2012, 17:30:02 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r9296 r9302 611 611 self.assertEqual(len(errs),0) 612 612 errs, inv_errs, conv_dict = self.processor.checkConversion( 613 dict(reg_number='1', level='900')) 613 dict(reg_number='1', level='999')) 614 self.assertEqual(len(errs),0) 615 errs, inv_errs, conv_dict = self.processor.checkConversion( 616 dict(reg_number='1', level='1000')) 614 617 self.assertEqual(len(errs),1) 615 618 self.assertTrue(('level','no valid integer') in errs) … … 650 653 self.csv_file, STUDYLEVEL_HEADER_FIELDS,'update') 651 654 self.assertEqual(num_warns,2) 655 shutil.rmtree(os.path.dirname(fin_file)) 656 657 def test_import_remove(self): 658 # We perform the same import twice, 659 # the second time in remove mode. The number 660 # of warnings must be the same. 661 num, num_warns, fin_file, fail_file = self.processor.doImport( 662 self.csv_file, STUDYLEVEL_HEADER_FIELDS,'create') 663 shutil.rmtree(os.path.dirname(fin_file)) 664 num, num_warns, fin_file, fail_file = self.processor.doImport( 665 self.csv_file, STUDYLEVEL_HEADER_FIELDS,'remove') 666 assert self.processor.entryExists( 667 dict(reg_number='1', level='100'), self.app) is False 668 self.assertEqual(num_warns,2) 669 652 670 shutil.rmtree(os.path.dirname(fin_file)) 653 671
Note: See TracChangeset for help on using the changeset viewer.