Ignore:
Timestamp:
16 Nov 2015, 09:10:31 (9 years ago)
Author:
Henrik Bettermann
Message:

Adjust to changes in base package.

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

Legend:

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

    r13317 r13460  
    944944        # ... but not if booking period has expired ...
    945945        self.app['hostels'].enddate = datetime.now(pytz.utc)
    946         self.browser.getLink("Book accommodation").click()
     946        self.browser.getControl("Book accommodation").click()
    947947        self.assertMatches('...Outside booking period: ...',
    948948                           self.browser.contents)
     
    950950        # ... or student data are incomplete ...
    951951        self.student['studycourse'].current_level = None
    952         self.browser.getLink("Book accommodation").click()
     952        self.browser.getControl("Book accommodation").click()
    953953        self.assertMatches('...Your data are incomplete...',
    954954            self.browser.contents)
    955955        self.student['studycourse'].current_level = 200
    956956        # ... or student is not the an allowed state ...
    957         self.browser.getLink("Book accommodation").click()
     957        self.browser.getControl("Book accommodation").click()
    958958        self.assertMatches('...You are in the wrong...',
    959959                           self.browser.contents)
     
    964964        self.student['studycourse'].current_level = 500 # final-year
    965965        self.student['studycourse'].current_verdict = 'C'
    966         self.browser.getLink("Book accommodation").click()
     966        self.browser.getControl("Book accommodation").click()
    967967        self.assertMatches('...Your are not eligible...',
    968968            self.browser.contents)
    969969        self.student['studycourse'].previous_verdict = 'A'
    970         self.browser.getLink("Book accommodation").click()
     970        self.browser.getControl("Book accommodation").click()
    971971        self.assertMatches('...Activation Code:...',
    972972                           self.browser.contents)
     
    996996        self.assertTrue(bed.owner == self.student_id)
    997997        # BedTicketAddPage is now blocked.
    998         self.browser.getLink("Book accommodation").click()
     998        self.browser.getControl("Book accommodation").click()
    999999        self.assertMatches('...You already booked a bed space...',
    10001000            self.browser.contents)
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r13450 r13460  
    388388        return None
    389389
    390     def selectBed(self, available_beds):
    391         """Select a bed from a list of available beds.
    392         Beds are sorted by the sort id of the hostel and the bed number.
    393         The first bed found in this sorted list is taken.
    394         """
    395         sorted_beds = sorted(available_beds,
    396             key=lambda bed: 1000 * bed.__parent__.sort_id + bed.bed_number)
    397         return sorted_beds[0]
    398 
    399390    # Uniben prefix
    400391    STUDENT_ID_PREFIX = u'B'
Note: See TracChangeset for help on using the changeset viewer.