Ignore:
Timestamp:
27 Oct 2012, 06:17:24 (12 years ago)
Author:
Henrik Bettermann
Message:

Log payment category also in doAfterStudentPayment.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py

    r9278 r9438  
    115115            if error is not None:
    116116                return False, error, error
    117         log = 'successful payment: %s' % self.p_id
     117        log = 'successful %s payment: %s' % (self.p_category, self.p_id)
    118118        msg = _('Successful payment')
    119119        return True, msg, log
     
    126126            if error is not None:
    127127                return False, error, error
    128         log = 'payment approved: %s' % self.p_id
     128        log = '%s payment approved: %s' % (self.p_category, self.p_id)
    129129        msg = _('Payment approved')
    130130        return True, msg, log
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r9437 r9438  
    793793        self.assertMatches('...Payment approved...',
    794794                          self.browser.contents)
     795        # Approval is logged
     796        logfile = os.path.join(
     797            self.app['datacenter'].storage, 'logs', 'students.log')
     798        logcontent = open(logfile).read()
     799        self.assertTrue(
     800            'zope.mgr - students.browser.OnlinePaymentApprovePage '
     801            '- K1000000 - schoolfee payment approved'
     802            in logcontent)
    795803
    796804        # The authorized amount has been stored in the access code
Note: See TracChangeset for help on using the changeset viewer.