Changeset 8886 for main/waeup.kofa/trunk/src
- Timestamp:
- 3 Jul 2012, 10:41:09 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r8885 r8886 618 618 student = self.getParent(row, site).__parent__ 619 619 student.__parent__.logger.info( 620 '%s - %s -updated: %s'621 % (student.student_id, obj.p_id,items_changed))620 '%s - Payment ticket updated: %s' 621 % (student.student_id, items_changed)) 622 622 return 623 623 … … 638 638 if payment is not None: 639 639 student = self._getStudent(row, site) 640 student.__parent__.logger.info('%s - removed: %s'640 student.__parent__.logger.info('%s - Payment ticket removed: %s' 641 641 % (student.student_id, payment.p_id)) 642 642 del parent[payment.p_id] 643 pass643 return 644 644 645 645 def checkConversion(self, row, mode='ignore'): -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r8884 r8886 825 825 self.app) is self.student['payments']['p120'] 826 826 827 def test_delEntry(self): 828 assert self.processor.getEntry( 829 dict(student_id=self.student.student_id, p_id='p120'), 830 self.app) is self.student['payments']['p120'] 831 self.assertEqual(len(self.student['payments'].keys()),1) 832 self.processor.delEntry( 833 dict(student_id=self.student.student_id, p_id='p120'), 834 self.app) 835 assert self.processor.getEntry( 836 dict(student_id=self.student.student_id, p_id='p120'), 837 self.app) is None 838 self.assertEqual(len(self.student['payments'].keys()),0) 839 827 840 def test_addEntry(self): 828 841 self.assertEqual(len(self.student['payments'].keys()),1) … … 870 883 self.assertEqual(str(payment.creation_date.tzinfo),'UTC') 871 884 shutil.rmtree(os.path.dirname(fin_file)) 872 873 885 logcontent = open(self.logfile).read() 874 # Logging message from updateEntry ,886 # Logging message from updateEntry 875 887 self.assertTrue( 876 888 'INFO - system - K1000001 - Payment ticket updated: ' … … 891 903 self.assertEqual(num_warns,0) 892 904 shutil.rmtree(os.path.dirname(fin_file)) 905 906 def test_import_remove(self): 907 num, num_warns, fin_file, fail_file = self.processor.doImport( 908 self.csv_file, PAYMENT_HEADER_FIELDS,'create') 909 num, num_warns, fin_file, fail_file = self.processor.doImport( 910 self.csv_file, PAYMENT_HEADER_FIELDS,'remove') 911 self.assertEqual(num_warns,0) 912 shutil.rmtree(os.path.dirname(fin_file)) 913 logcontent = open(self.logfile).read() 914 self.assertTrue( 915 'INFO - system - K1000001 - Payment ticket removed: p1266236341955' 916 in logcontent) 893 917 894 918 def test_import_wo_pid(self):
Note: See TracChangeset for help on using the changeset viewer.