Changeset 10030 for main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Timestamp:
- 17 Mar 2013, 08:40:59 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/payment.py
r9984 r10030 27 27 from waeup.kofa.interfaces import MessageFactory as _ 28 28 from waeup.kofa.payments import OnlinePayment 29 from waeup.kofa.payments.interfaces import IPay mentWebservice29 from waeup.kofa.payments.interfaces import IPayer 30 30 from waeup.kofa.applicants.interfaces import IApplicantOnlinePayment 31 31 from waeup.kofa.utils.helpers import attrs_to_fields … … 78 78 ApplicantOnlinePayment, omit=['display_item']) 79 79 80 class Pay mentWebservice(grok.Adapter):81 """An adapter to publish applicant data through a webservice.80 class Payer(grok.Adapter): 81 """An adapter to publish applicant data through a simple webservice. 82 82 """ 83 83 grok.context(IApplicantOnlinePayment) 84 grok.implements(IPay mentWebservice)84 grok.implements(IPayer) 85 85 86 86 @property 87 87 def display_fullname(self): 88 "Name of paye e"88 "Name of payer" 89 89 return self.context.__parent__.display_fullname 90 90 91 91 @property 92 92 def id(self): 93 "Id of paye e"93 "Id of payer" 94 94 return self.context.__parent__.applicant_id 95 95 96 96 @property 97 97 def reg_number(self): 98 "Reg number of paye e"98 "Reg number of payer" 99 99 return self.context.__parent__.reg_number 100 100 -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r9929 r10030 37 37 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 38 38 from waeup.kofa.app import University 39 from waeup.kofa.payments.interfaces import IPay mentWebservice39 from waeup.kofa.payments.interfaces import IPayer 40 40 from waeup.kofa.configuration import SessionConfiguration 41 41 from waeup.kofa.applicants.container import ApplicantsContainer … … 758 758 self.assertEqual(payment.p_category,'application') 759 759 self.assertEqual(payment.amount_auth,200.0) 760 # Applicant is paye eof the payment ticket.760 # Applicant is payer of the payment ticket. 761 761 self.assertEqual( 762 IPay mentWebservice(payment).display_fullname, 'John Anthony Tester')762 IPayer(payment).display_fullname, 'John Anthony Tester') 763 763 self.assertEqual( 764 IPay mentWebservice(payment).id, self.applicant.applicant_id)765 self.assertEqual(IPay mentWebservice(payment).faculty, '')766 self.assertEqual(IPay mentWebservice(payment).department, '')764 IPayer(payment).id, self.applicant.applicant_id) 765 self.assertEqual(IPayer(payment).faculty, '') 766 self.assertEqual(IPayer(payment).department, '') 767 767 # The pdf payment slip can't yet be opened 768 768 #self.browser.open(payment_url + '/payment_receipt.pdf') -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_payment.py
r9533 r10030 22 22 from zope.interface import verify 23 23 from waeup.kofa.applicants.payment import ( 24 ApplicantOnlinePayment, ApplicantOnlinePaymentFactory, Pay mentWebservice)25 from waeup.kofa.payments.interfaces import IOnlinePayment, IPay mentWebservice24 ApplicantOnlinePayment, ApplicantOnlinePaymentFactory, Payer) 25 from waeup.kofa.payments.interfaces import IOnlinePayment, IPayer 26 26 27 27 class ApplicantOnlinePaymentFactoryTest(unittest.TestCase): … … 39 39 assert implemented_by.isOrExtends(IOnlinePayment) 40 40 41 def test_ webservice_interface(self):42 verify.verifyClass(IPay mentWebservice, PaymentWebservice)41 def test_payer_interface(self): 42 verify.verifyClass(IPayer, Payer)
Note: See TracChangeset for help on using the changeset viewer.