Ignore:
Timestamp:
25 Oct 2012, 05:28:56 (12 years ago)
Author:
Henrik Bettermann
Message:

Extend test to cover changes of previous revision.

File:
1 edited

Legend:

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

    r9338 r9412  
    847847
    848848    def test_manage_accommodation(self):
     849        logfile = os.path.join(
     850            self.app['datacenter'].storage, 'logs', 'students.log')
    849851        # Managers can add online booking fee payment tickets and open the
    850852        # callback view (see test_manage_payments)
     
    909911        self.assertMatches('...regular_male_fr...', self.browser.contents)
    910912        self.assertMatches('...%s...' % pin, self.browser.contents)
     913        # Booking is properly logged
     914        logcontent = open(logfile).read()
     915        self.assertTrue('zope.mgr - students.browser.BedTicketAddPage '
     916            '- K1000000 - booked: hall-1_A_101_A' in logcontent)
    911917        # Managers can relocate students if the student's bed_type has changed
    912918        self.browser.getLink("Relocate student").click()
     
    922928        self.assertTrue(self.student['accommodation'][
    923929            '2004'].bed_type == u'regular_female_fr')
     930        # Relocation is properly logged
     931        logcontent = open(logfile).read()
     932        self.assertTrue('zope.mgr - students.browser.BedTicketRelocationPage '
     933            '- K1000000 - relocated: hall-1_A_101_B' in logcontent)
    924934        # The payment object still shows the original payment item
    925935        payment_id = self.student['payments'].keys()[0]
Note: See TracChangeset for help on using the changeset viewer.