Changeset 13389 for main/waeup.kwarapoly
- Timestamp:
- 4 Nov 2015, 15:42:26 (9 years ago)
- Location:
- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r13329 r13389 80 80 notify(grok.ObjectModifiedEvent(self.student)) 81 81 82 # Maint payment checking disabled on 5th Dec 2014 83 def xx_test_schoolfee_ticket_creation(self): 82 def test_schoolfee_ticket_creation(self): 84 83 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 85 84 self.browser.open(self.payments_path) … … 111 110 self.assertMatches('...Amount Authorized...', 112 111 self.browser.contents) 113 self.assertTrue( 114 '<span>39400.0</span>' in self.browser.contents) 112 self.assertTrue('<span>40700.0</span>' in self.browser.contents) 115 113 self.payment_url = self.browser.url 116 114 -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py
r13341 r13389 105 105 self.browser.open(self.payments_path + '/addop') 106 106 107 # Maint payment checking disabled on 5th Dec 2014 108 #self.browser.getControl(name="form.p_category").value = ['schoolfee'] 109 #self.browser.getControl("Create ticket").click() 110 #self.assertMatches('...Book and pay for accommodation first...', 111 # self.browser.contents) 112 ## In KwaraPoly only returning students can create school fee payment 113 ## without having paid accommodation fee 107 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 108 self.browser.getControl("Create ticket").click() 109 self.assertMatches('...Book and pay for accommodation first...', 110 self.browser.contents) 111 # In KwaraPoly only returning students can create school fee payment 112 # without having paid accommodation fee 114 113 115 114 IWorkflowState(self.student).setState('returning') … … 222 221 self.assertEqual(we_ft(self.student), 'ft') 223 222 224 # Maint payment checking disabled on 5th Dec 2014 225 #error, payment = utils.setPaymentDetails('schoolfee',self.student) 226 #self.assertEqual(error, 227 # 'Book and pay for accommodation first before making' 228 # ' school fee payments.') 229 ## We add a fake maint. payment ticket to meet the condition 230 #maint_payment = createObject('waeup.StudentOnlinePayment') 231 #self.student['payments']['any_key'] = maint_payment 232 #maint_payment.p_category = 'hostel_maintenance' 233 #maint_payment.p_state = 'paid' 234 #maint_payment.p_session = 2004 223 error, payment = utils.setPaymentDetails('schoolfee',self.student) 224 self.assertEqual(error, 225 'Book and pay for accommodation first before making' 226 ' school fee payments.') 227 # We add a fake maint. payment ticket to meet the condition 228 maint_payment = createObject('waeup.StudentOnlinePayment') 229 self.student['payments']['any_key'] = maint_payment 230 maint_payment.p_category = 'hostel_maintenance' 231 maint_payment.p_state = 'paid' 232 maint_payment.p_session = 2004 235 233 236 234 error, payment = utils.setPaymentDetails('schoolfee',self.student) -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py
r13306 r13389 132 132 133 133 def _maintPaymentMade(self, student, session): 134 135 # Maint payment checking disabled on 5th Dec 2014 136 return True 137 138 #if len(student['payments']): 139 # for ticket in student['payments'].values(): 140 # if ticket.p_category == 'hostel_maintenance' and \ 141 # ticket.p_session == session and ticket.p_state == 'paid': 142 # return True 143 #return False 134 if len(student['payments']): 135 for ticket in student['payments'].values(): 136 if ticket.p_category == 'hostel_maintenance' and \ 137 ticket.p_session == session and ticket.p_state == 'paid': 138 return True 139 return False 144 140 145 141 def _bedAvailable(self, student):
Note: See TracChangeset for help on using the changeset viewer.