Ignore:
Timestamp:
9 Nov 2011, 13:34:17 (13 years ago)
Author:
Henrik Bettermann
Message:

Add more tests.

browser.py: If student owns a bed, this bed will be taken (to be prepared for the upcoming student allocation feature), otherwise an empty bed is looked up.

File:
1 edited

Legend:

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

    r7057 r7060  
    10041004        pin = self.app['accesscodes']['HOS-0'].keys()[0]
    10051005        ac = self.app['accesscodes']['HOS-0'][pin]
    1006         ac.owner = self.student_id
     1006        ac.owner = u'Anybody'
    10071007        parts = pin.split('-')[1:]
    10081008        sfeseries, sfenumber = parts
     
    10171017        self.assertMatches('...Activation Code:...',
    10181018                           self.browser.contents)
     1019        self.browser.getControl(name="ac_series").value = u'nonsense'
     1020        self.browser.getControl(name="ac_number").value = sfenumber
     1021        self.browser.getControl("Create bed ticket").click()
     1022        self.assertMatches('...Activation code is invalid...',
     1023                           self.browser.contents)
     1024        self.browser.getControl(name="ac_series").value = sfeseries
     1025        self.browser.getControl(name="ac_number").value = sfenumber
     1026        self.browser.getControl("Create bed ticket").click()
     1027        self.assertMatches('...You are not the owner of this access code...',
     1028                           self.browser.contents)
     1029        ac.owner = self.student_id
    10191030        self.browser.getControl(name="ac_series").value = sfeseries
    10201031        self.browser.getControl(name="ac_number").value = sfenumber
Note: See TracChangeset for help on using the changeset viewer.