Changeset 10739


Ignore:
Timestamp:
12 Nov 2013, 12:33:05 (11 years ago)
Author:
Henrik Bettermann
Message:

Exclude ITCH students from hostel allocation.

Location:
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_browser.py

    r10735 r10739  
    356356        return
    357357
     358    def test_no_beds_for_itch(self):
     359        self.app['faculties']['fac1'].code = 'ITCH'
     360        del self.student['accommodation']['2004']
     361        # Login
     362        self.browser.open(self.login_path)
     363        self.browser.getControl(name="form.login").value = self.student_id
     364        self.browser.getControl(name="form.password").value = 'spwd'
     365        self.browser.getControl("Login").click()
     366
     367        self.browser.open(self.acco_path)
     368        IWorkflowInfo(self.student).fireTransition('admit')
     369        self.browser.getLink("Book accommodation").click()
     370        self.browser.getControl("Create bed ticket").click()
     371        self.assertTrue('There is no free bed in your category itch_male_fr.' in
     372                           self.browser.contents)
     373        return
     374
    358375    def test_admission_pdf_slips(self):
    359376        # Login
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py

    r10735 r10739  
    293293            sex = 'male'
    294294        special_handling = 'regular'
     295        if student.faccode == 'ITCH':
     296            special_handling = 'itch'
    295297        d['bt'] = u'%s_%s_%s' % (special_handling,sex,bt)
    296298        return d
Note: See TracChangeset for help on using the changeset viewer.