Ignore:
Timestamp:
13 Jun 2012, 13:29:35 (13 years ago)
Author:
Henrik Bettermann
Message:

Add more attributes to webservice adapter.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/payment.py

    r8703 r8708  
    8484
    8585    @property
    86     def payee(self):
     86    def display_fullname(self):
     87        "Name of  payee."
    8788        return self.context.__parent__.display_fullname
     89
     90    @property
     91    def id(self):
     92        "Id of payee"
     93        return self.context.__parent__.applicant_id
     94
     95    @property
     96    def faculty(self):
     97        "Faculty of payee"
     98        return ''
     99
     100    @property
     101    def department(self):
     102        "Department of payee"
     103        return ''
    88104
    89105# Applicant online payments must be importable. So we might need a factory.
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r8703 r8708  
    732732        self.assertEqual(payment.amount_auth,200.0)
    733733        # Applicant is payee of the payment ticket.
    734         self.assertEqual(IPaymentWebservice(payment).payee, 'John Tester')
     734        self.assertEqual(
     735            IPaymentWebservice(payment).display_fullname, 'John Tester')
     736        self.assertEqual(
     737            IPaymentWebservice(payment).id, self.applicant.applicant_id)
     738        self.assertEqual(IPaymentWebservice(payment).faculty, '')
     739        self.assertEqual(IPaymentWebservice(payment).department, '')
    735740        # The pdf payment slip can't yet be opened
    736741        #self.browser.open(payment_url + '/payment_receipt.pdf')
Note: See TracChangeset for help on using the changeset viewer.