Changeset 9190
- Timestamp:
- 16 Sep 2012, 04:30:12 (12 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene/students
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/browser.py
r9181 r9190 22 22 from waeup.kofa.interfaces import MessageFactory as _ 23 23 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 24 from waeup.kofa.students.browser import StartClearancePage 24 from waeup.kofa.students.browser import StartClearancePage, BedTicketAddPage 25 25 from kofacustom.nigeria.students.browser import ( 26 26 NigeriaOnlinePaymentDisplayFormPage, 27 27 NigeriaOnlinePaymentAddFormPage, 28 28 NigeriaExportPDFPaymentSlipPage, 29 NigeriaStudentClearanceEditFormPage) 29 NigeriaStudentClearanceEditFormPage, 30 ) 30 31 31 32 from waeup.fceokene.students.interfaces import ICustomStudentOnlinePayment … … 85 86 def dataNotComplete(self): 86 87 return False 88 89 class BedTicketAddPage(BedTicketAddPage): 90 """ Page to add an online payment ticket 91 """ 92 grok.template('bookbed') 93 buttonname = _('Create bed ticket') 94 notice = '' 95 with_ac = False -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_browser.py
r9156 r9190 269 269 self.assertMatches('...Clearance process has been started...', 270 270 self.browser.contents) 271 272 def test_student_accommodation(self): 273 # Login 274 self.browser.open(self.login_path) 275 self.browser.getControl(name="form.login").value = self.student_id 276 self.browser.getControl(name="form.password").value = 'spwd' 277 self.browser.getControl("Login").click() 278 279 # Students can book accommodation without AC ... 280 self.browser.open(self.acco_path) 281 IWorkflowInfo(self.student).fireTransition('admit') 282 self.browser.getLink("Book accommodation").click() 283 self.assertFalse('Activation Code:' in self.browser.contents) 284 self.browser.getControl("Create bed ticket").click() 285 # Bed is randomly selected but, since there is only 286 # one bed for this student, we know that 287 self.assertMatches('...Hall 1, Block A, Room 101, Bed A...', 288 self.browser.contents) 289 return -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r9153 r9190 17 17 ## 18 18 import grok 19 import random 19 20 from time import time 20 21 from zope.component import createObject … … 29 30 30 31 """ 32 33 def selectBed(self, available_beds): 34 """Randomly select a bed from a list of available beds. 35 36 """ 37 return random.choice(available_beds) 31 38 32 39 def getReturningData(self, student):
Note: See TracChangeset for help on using the changeset viewer.