Changeset 17551 for main


Ignore:
Timestamp:
21 Aug 2023, 20:44:19 (16 months ago)
Author:
Henrik Bettermann
Message:

Students are now using the access code.

File:
1 edited

Legend:

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

    r17511 r17551  
    12101210        # All beds can be assigned
    12111211        bed1 = self.app['hostels']['hall-1']['hall-1_A_101_A']
    1212         bed1.bed_type = u'regular_male_all'
     1212        bed1.bed_type = u'regular_male_fr'
    12131213        bed2 = self.app['hostels']['hall-1']['hall-1_A_101_B']
    12141214        bed2.bed_type = u'regular_female_all'
     
    12201220        self.browser.getControl(name="form.password").value = 'spwd'
    12211221        self.browser.getControl("Login").click()
    1222         # Students can book accommodation without AC ...
    12231222        self.browser.open(self.acco_path)
    12241223        IWorkflowInfo(self.student).fireTransition('admit')
     
    12341233            in self.browser.contents)
    12351234        IWorkflowState(self.student).setState(PAID)
     1235
     1236        self.browser.getLink("Payments").click()
     1237        self.browser.getLink("Add current session payment ticket").click()
     1238        self.browser.getControl(name="form.p_category").value = ['bed_allocation']
     1239        self.browser.getControl("Create ticket").click()
     1240        self.student['payments'].values()[0].approveStudentPayment()
     1241        pin = self.app['accesscodes']['HOS-0'].keys()[0]
     1242        ac = self.app['accesscodes']['HOS-0'][pin]
     1243        parts = pin.split('-')[1:]
     1244        sfeseries, sfenumber = parts
     1245        self.browser.open(self.acco_path)
    12361246        self.browser.getControl("Book accommodation").click()
    12371247        #self.assertFalse('Activation Code:' in self.browser.contents)
     1248
     1249        self.assertMatches('...Activation Code:...',
     1250                           self.browser.contents)
     1251        self.browser.getControl(name="ac_series").value = sfeseries
     1252        self.browser.getControl(name="ac_number").value = sfenumber
    12381253        self.browser.getControl("Create bed ticket").click()
    12391254        # Bed is randomly selected but, since there is only
    12401255        # one bed for this student, we know that
    12411256        self.assertEqual(self.student['accommodation']['2004'].bed_coordinates,
    1242             'Hall 1, Block A, Room 101, Bed A (regular_male_all)')
     1257            'Hall 1, Block A, Room 101, Bed A (regular_male_fr)')
    12431258        # Only the hall name is displayed
    12441259        self.assertEqual(self.student[
Note: See TracChangeset for help on using the changeset viewer.