Changeset 11627 for main/waeup.aaue/trunk/src/waeup/aaue/students/tests
- Timestamp:
- 7 May 2014, 18:21:58 (11 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r11624 r11627 135 135 self.browser.contents) 136 136 self.app['configuration']['2004'].school_fee_1 = 6666.0 137 self.browser.getControl(name="form.p_category").value = ['schoolfee']137 #self.browser.getControl(name="form.p_category").value = ['schoolfee'] 138 138 # Accepotance fee must be paid first 139 self.browser.getControl("Create ticket").click()140 self.assertMatches('...Please pay acceptance fee first...',141 self.browser.contents)139 #self.browser.getControl("Create ticket").click() 140 #self.assertMatches('...Please pay acceptance fee first...', 141 # self.browser.contents) 142 142 self.app['configuration']['2004'].clearance_fee = 666.0 143 143 self.browser.getControl(name="form.p_category").value = ['clearance'] 144 144 self.browser.getControl("Create ticket").click() 145 145 ctrl = self.browser.getControl(name='val_id') 146 value = ctrl.options[0]147 self.student['payments'][value].approveStudentPayment()146 cpt_value = ctrl.options[0] 147 # School fee payment ticket can be added ... 148 148 self.browser.open(self.payments_path + '/addop') 149 149 self.browser.getControl(name="form.p_category").value = ['schoolfee'] … … 151 151 self.assertMatches('...ticket created...', 152 152 self.browser.contents) 153 # ... but not paid through the query_history page. 153 154 ctrl = self.browser.getControl(name='val_id') 154 value = ctrl.options[1] 155 self.browser.getLink(value).click() 156 self.assertMatches('...Amount Authorized...', 157 self.browser.contents) 155 sfpt_value = ctrl.options[1] 156 self.browser.open(self.payments_path + '/' + sfpt_value) 157 self.browser.getLink("Query eTranzact History").click() 158 self.assertMatches('...alert-danger">Please pay acceptance fee first...', 159 self.browser.contents) 160 # If clearance/acceptance fee is paid ... 161 self.student['payments'][cpt_value].approveStudentPayment() 162 self.browser.getLink("Query eTranzact History").click() 163 # ... query_history page is accessible. 164 self.assertMatches( 165 '...<h1 class="kofa-content-label">Requery eTranzact History</h1>...', 166 self.browser.contents) 158 167 # Managers can open school fee payment slip 168 self.browser.open(self.payments_path + '/' + sfpt_value) 159 169 self.browser.getLink("Download payment slip").click() 160 170 self.assertEqual(self.browser.headers['Status'], '200 Ok') 161 171 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 162 # Set ticket paid 163 ticket = self.student['payments'][value].approveStudentPayment() 172 # If school fee ticket is paid ... 173 ticket = self.student['payments'][sfpt_value].approveStudentPayment() 174 # ... no further school fee ticket can be added. 164 175 self.browser.open(self.payments_path + '/addop') 165 176 self.browser.getControl(name="form.p_category").value = ['schoolfee'] … … 167 178 self.assertMatches('...This type of payment has already been made...', 168 179 self.browser.contents) 169 170 180 171 181 def deactivated_test_for_instalment_payments(self): -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
r11624 r11627 37 37 return 38 38 39 def test_no_clearance_ac_code_created(self): 40 payment = createObject('waeup.StudentOnlinePayment') 41 payment.p_category = 'clearance' 42 self.student['payments']['any_id'] = payment 43 payment.approveStudentPayment() 44 # No activation code created. 45 self.assertEqual(payment.ac, None) 46 39 47 def test_set_payment_details(self): 40 48 self.app['configuration']['2004'].gown_fee = 150.0 … … 54 62 self.assertEqual(payment, None) 55 63 self.assertEqual(error, u'Wrong state.') 56 57 64 IWorkflowState(self.student).setState('cleared') 58 error, payment = utils.setPaymentDetails('schoolfee',self.student)59 # Acceptance fee must be paid first.60 self.assertEqual(error, 'Please pay acceptance fee first.')61 payment = createObject('waeup.StudentOnlinePayment')62 payment.p_category = 'clearance'63 self.student['payments']['any_id'] = payment64 payment.approveStudentPayment()65 # No activation code created.66 self.assertEqual(payment.ac, None)67 65 # School fee can be set. 68 66 error, payment = utils.setPaymentDetails('schoolfee',self.student) … … 72 70 self.assertEqual(payment.p_item, u'CERT1') 73 71 self.assertEqual(error, None) 74 75 72 # Add penalty fee ... 76 73 # ... for cleared
Note: See TracChangeset for help on using the changeset viewer.