Changeset 10832 for main/waeup.kofa/trunk
- Timestamp:
- 10 Dec 2013, 07:40:18 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r10831 r10832 758 758 in logcontent) 759 759 760 def test_pay_ application_fee(self):760 def test_pay_portal_application_fee(self): 761 761 self.login() 762 762 self.browser.open(self.edit_path) … … 869 869 return 870 870 871 def test_pay_container_application_fee(self): 872 self.login() 873 self.browser.open(self.edit_path) 874 self.fill_correct_values() 875 self.browser.getControl("Save").click() 876 configuration = SessionConfiguration() 877 configuration.academic_session = session_1 878 self.applicantscontainer.application_fee = 120.0 879 configuration.application_fee = 9999.9 880 self.app['configuration'].addSessionConfiguration(configuration) 881 self.browser.open(self.edit_path) 882 self.browser.getControl("Add online payment ticket").click() 883 self.assertMatches('...Payment ticket created...', 884 self.browser.contents) 885 self.assertMatches('...Payment ticket created...', 886 self.browser.contents) 887 self.assertFalse( 888 '<span>9999.9</span>' in self.browser.contents) 889 self.assertTrue( 890 '<span>120.0</span>' in self.browser.contents) 891 self.assertTrue( 892 '<span>Application Fee</span>' in self.browser.contents) 893 return 871 894 872 895 def test_pay_special_fee(self): -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
r10831 r10832 47 47 """ 48 48 timestamp = ("%d" % int(time()*10000))[1:] 49 container_fee = container.application_fee 50 if container_fee: 51 payment.amount_auth = container_fee 52 else: 53 session = str(container.year) 54 try: 55 session_config = grok.getSite()['configuration'][session] 56 except KeyError: 57 return _(u'Session configuration object is not available.') 58 payment.amount_auth = session_config.application_fee 59 payment.p_category = 'application' 49 session = str(container.year) 50 try: 51 session_config = grok.getSite()['configuration'][session] 52 except KeyError: 53 return _(u'Session configuration object is not available.') 54 payment.p_id = "p%s" % timestamp 55 payment.p_item = container.title 56 payment.p_session = container.year 60 57 if container.prefix.startswith('special'): 61 58 fee_name = applicant.special_application + '_fee' 62 59 payment.amount_auth = getattr(session_config, fee_name, 0.0) 63 60 payment.p_category = applicant.special_application 64 payment.p_id = "p%s" % timestamp 65 payment.p_item = container.title 66 payment.p_session = container.year 67 return None 61 return 62 payment.p_category = 'application' 63 container_fee = container.application_fee 64 if container_fee: 65 payment.amount_auth = container_fee 66 return 67 payment.amount_auth = session_config.application_fee 68 return 68 69 69 70 def getApplicantsStatistics(self, container):
Note: See TracChangeset for help on using the changeset viewer.