Changeset 13523 for main/waeup.aaue/trunk/src/waeup/aaue
- Timestamp:
- 2 Dec 2015, 12:01:00 (9 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r13512 r13523 19 19 from zope.i18n import translate 20 20 from zope.component import getUtility 21 from zope.security import checkPermission 21 22 from zope.formlib.textwidgets import BytesDisplayWidget 22 23 from waeup.kofa.browser.layout import UtilityView … … 34 35 BedTicketAddPage, 35 36 StudentFilesUploadPage, 37 PaymentsManageFormPage, 36 38 ) 37 39 from kofacustom.nigeria.students.browser import ( … … 126 128 form_fields = grok.AutoFields(ICustomStudentOnlinePayment).select( 127 129 'p_category') 130 131 class CustomPaymentsManageFormPage(PaymentsManageFormPage): 132 """ Page to manage the student payments. 133 134 This manage form page is for both students and students officers. 135 """ 136 @property 137 def manage_payments_allowed(self): 138 return checkPermission('waeup.manageStudent', self.context) 128 139 129 140 class CustomExportPDFPaymentSlip(NigeriaExportPDFPaymentSlip): -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r13512 r13523 305 305 self.browser.getControl("Create ticket").click() 306 306 self.assertTrue('ticket created' in self.browser.contents) 307 ctrl = self.browser.getControl(name='val_id') 308 value = ctrl.options[0] 307 value = self.student['payments'].keys()[0] 309 308 self.browser.getLink(value).click() 310 309 self.assertTrue('Amount Authorized' in self.browser.contents) … … 322 321 self.browser.getControl("Create ticket").click() 323 322 self.assertTrue('ticket created' in self.browser.contents) 324 ctrl = self.browser.getControl(name='val_id') 325 value = ctrl.options[1] 323 value = self.student['payments'].keys()[1] 326 324 self.browser.getLink(value).click() 327 325 self.assertTrue('<span>My bed coordinates</span>' in self.browser.contents) … … 348 346 self.assertMatches('...ticket created...', 349 347 self.browser.contents) 350 self.browser.open(self.payments_path)351 ctrl = self.browser.getControl(name='val_id')352 value = ctrl.options[0]353 348 self.browser.getLink("Study Course").click() 354 349 self.browser.getLink("Add course list").click() … … 360 355 self.browser.getControl("Register course list").click() 361 356 self.assertTrue('Course registration has ended. Please pay' in self.browser.contents) 362 self.student['payments'] [value].approve()357 self.student['payments'].values()[0].approve() 363 358 self.browser.getControl("Register course list").click() 364 359 self.assertTrue('Course list has been registered' in self.browser.contents) … … 367 362 # register courses. 368 363 self.student['studycourse'].entry_session = 2004 369 del self.student['payments'][ value]364 del self.student['payments'][self.student['payments'].keys()[0]] 370 365 IWorkflowState(self.student).setState('school fee paid') 371 366 self.browser.open(self.studycourse_path + '/100/edit')
Note: See TracChangeset for help on using the changeset viewer.