Changeset 9771
- Timestamp:
- 5 Dec 2012, 10:41:11 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r9759 r9771 669 669 success, msg, log = self.context.approveApplicantPayment() 670 670 if log is not None: 671 self.context.__parent__.writeLogMessage(self, log) 671 applicant = self.context.__parent__ 672 # Add log message to applicants.log 673 applicant.writeLogMessage(self, log) 674 # Add log message to payments.log 675 self.context.logger.info( 676 '%s,%s,%s,%s,%s,,,,,,,,,,,,' % ( 677 applicant.applicant_id, 678 self.context.p_id, self.context.p_category, 679 self.context.amount_auth, self.context.r_code)) 672 680 self.flash(msg) 673 681 return -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r9544 r9771 802 802 self.assertEqual(payment.r_code, 'AP') 803 803 self.assertTrue(self.applicant.state == 'paid') 804 # Approval is logged in students.log ... 805 logfile = os.path.join( 806 self.app['datacenter'].storage, 'logs', 'applicants.log') 807 logcontent = open(logfile).read() 808 self.assertTrue( 809 'zope.mgr - applicants.browser.OnlinePaymentApprovePage - ' 810 '%s - payment approved' % self.applicant.applicant_id 811 in logcontent) 812 # ... and in payments.log 813 logfile = os.path.join( 814 self.app['datacenter'].storage, 'logs', 'payments.log') 815 logcontent = open(logfile).read() 816 self.assertTrue( 817 '"zope.mgr",%s,%s,application,200.0,AP,,,,,,,,,,,,\n' 818 % (self.applicant.applicant_id, payment.p_id) 819 in logcontent) 804 820 return 805 821
Note: See TracChangeset for help on using the changeset viewer.