Ignore:
Timestamp:
5 Jul 2021, 15:42:14 (3 years ago)
Author:
Henrik Bettermann
Message:

Extend IPayer adapter.

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

    r15325 r16526  
    182182
    183183    @property
     184    def payer(self):
     185        "The payer object"
     186        return self.context.student
     187
     188    @property
    184189    def display_fullname(self):
    185190        "Name of  payer"
     
    230235        "Current level of payer"
    231236        return self.context.student.current_level
     237
     238    def doAfterPayment(self):
     239        "Do after payment was made."
     240        return self.context.student.doAfterStudentPayment()
    232241
    233242# Student online payments must be importable. So we might need a factory.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r16465 r16526  
    34083408        # Student is the payer of the payment ticket.
    34093409        payer = IPayer(self.student['payments'][value])
     3410        self.assertEqual(payer.payer, self.student)
    34103411        self.assertEqual(payer.display_fullname, 'Anna Tester')
    34113412        self.assertEqual(payer.id, self.student_id)
Note: See TracChangeset for help on using the changeset viewer.