- Timestamp:
- 30 Oct 2012, 17:31:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r9466 r9467 909 909 payment1.p_id = 'nonsense' 910 910 # payment1.p_id will be replaced if p_id doesn't start with 'p' 911 # and is not an old PIN 911 912 self.processor.addEntry( 912 913 payment2, dict(student_id=self.student.student_id, p_id='XXXXXX456'), … … 923 924 self.assertEqual(len(errs),0) 924 925 errs, inv_errs, conv_dict = self.processor.checkConversion( 926 dict(p_id='ABC-11-1234567890')) 927 self.assertEqual(len(errs),0) 928 errs, inv_errs, conv_dict = self.processor.checkConversion( 925 929 dict(p_id='nonsense')) 926 930 self.assertEqual(len(errs),1) … … 935 939 self.csv_file, PAYMENT_HEADER_FIELDS,'create') 936 940 self.assertEqual(num_warns,0) 941 937 942 payment = self.processor.getEntry(dict(reg_number='1', 938 943 p_id='p2907979737440'), self.app) … … 942 947 self.assertEqual(cdate, "2010-11-26 18:59:33") 943 948 self.assertEqual(str(payment.creation_date.tzinfo),'UTC') 949 944 950 payment = self.processor.getEntry(dict(matric_number='100001', 945 951 p_id='p2907125937570'), self.app) … … 953 959 self.assertEqual(cdate, "2010-11-25 21:16:33") 954 960 self.assertEqual(str(payment.creation_date.tzinfo),'UTC') 961 962 payment = self.processor.getEntry(dict(reg_number='3', 963 p_id='ABC-11-1234567890'), self.app) 964 self.assertEqual(payment.amount_auth, 19500.6) 965 955 966 shutil.rmtree(os.path.dirname(fin_file)) 956 967 logcontent = open(self.logfile).read() … … 961 972 'p_category=schoolfee, amount_auth=19500.0, p_current=True, ' 962 973 'p_id=p1266236341955, r_code=00, r_amount_approved=19500.0, ' 974 'p_state=paid' 975 in logcontent) 976 self.assertTrue( 977 'INFO - system - K1000001 - Payment ticket updated: ' 978 'p_item=BTECHBDT, creation_date=2010-02-15 13:19:01+00:00, ' 979 'p_category=schoolfee, amount_auth=19500.6, p_current=True, ' 980 'p_id=ABC-11-1234567890, r_code=SC, r_amount_approved=19500.0, ' 963 981 'p_state=paid' 964 982 in logcontent)
Note: See TracChangeset for help on using the changeset viewer.