Changeset 14779 for main


Ignore:
Timestamp:
7 Aug 2017, 17:04:11 (7 years ago)
Author:
Henrik Bettermann
Message:

Log RRR retrieval.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/applicantsbrowser.py

    r14774 r14779  
    261261        self.hashvalue = hashlib.sha512(hashargs).hexdigest()
    262262        self.customer = self.context.__parent__
     263        self.customer.writeLogMessage(self, 'RRR retrieved: %s' % self.rrr)
    263264        return
    264265
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/studentsbrowser.py

    r14774 r14779  
    277277        self.hashvalue = hashlib.sha512(hashargs).hexdigest()
    278278        self.customer = self.context.student
     279        self.customer.writeLogMessage(self, 'RRR retrieved: %s' % self.rrr)
    279280        return
    280281
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/tests.py

    r14766 r14779  
    192192        self.assertEqual(self.payment.r_pay_reference, self.rrr)
    193193        self.assertEqual(self.payment.r_company, 'remita')
     194        # Retrieval has been logged
     195        logfile = os.path.join(
     196            self.app['datacenter'].storage, 'logs', 'students.log')
     197        logcontent = open(logfile).read()
     198        self.assertTrue(
     199            'zope.mgr - kofacustom.nigeria.remita.studentsbrowser.RemitaPageStudent'
     200            ' - K1000000 - RRR retrieved: %s' % self.rrr in logcontent)
    194201        # Means of testing end here.
    195202        return
     
    260267        self.assertEqual(self.payment.r_pay_reference, self.rrr)
    261268        self.assertEqual(self.payment.r_company, 'remita')
     269        # Retrieval has been logged
     270        logfile = os.path.join(
     271            self.app['datacenter'].storage, 'logs', 'applicants.log')
     272        logcontent = open(logfile).read()
     273        self.assertTrue(
     274            'zope.mgr - kofacustom.nigeria.remita.applicantsbrowser.RemitaPageApplicant'
     275            ' - %s - RRR retrieved: %s'
     276            % (self.applicant.applicant_id, self.rrr) in logcontent)
    262277        # Means of testing end here.
    263278        return
Note: See TracChangeset for help on using the changeset viewer.