Ignore:
Timestamp:
8 Nov 2011, 06:42:07 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement ExportPDFBedTicketSlipPage.

File:
1 edited

Legend:

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

    r7026 r7027  
    981981        parts = pin.split('-')[1:]
    982982        sfeseries, sfenumber = parts
     983
    983984        # Students can use HOS code and book a bed space with it
    984985        self.browser.open(self.acco_student_path)
     
    995996        self.assertMatches('...Hall 1, Block A, Room 101, Bed A...',
    996997                           self.browser.contents)
     998
    997999        # Bed has been allocated
    9981000        bed = self.app['hostels']['hall-1']['hall-1_A_101_A']
    9991001        self.assertTrue(bed.owner == self.student_id)
     1002
    10001003        # BedTicketAddPage is now blocked
    10011004        self.browser.getLink("Book accommodation").click()
    10021005        self.assertMatches('...You already booked a bed space...',
    10031006            self.browser.contents)
     1007
    10041008        # The bed ticket displays the data correctly
    10051009        self.browser.open(self.acco_student_path + '/2004')
     
    10091013        self.assertMatches('...regular_male_fr...', self.browser.contents)
    10101014        self.assertMatches('...%s...' % pin, self.browser.contents)
     1015
     1016        # Students can open the pdf slip
     1017        self.browser.open(self.browser.url + '/bed_allocation.pdf')
     1018        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     1019        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     1020
    10111021        # Students can't relocate themselves
    10121022        self.assertFalse('Relocate' in self.browser.contents)
     
    10141024        self.assertRaises(
    10151025            Unauthorized, self.browser.open, relocate_path)
     1026
    10161027        # Students can't the Remove button and check boxes
    10171028        self.browser.open(self.acco_student_path)
Note: See TracChangeset for help on using the changeset viewer.