Ignore:
Timestamp:
14 Oct 2015, 06:56:25 (9 years ago)
Author:
Henrik Bettermann
Message:

Improve test to show why notify(grok.ObjectModifiedEvent?(self)) is necessary when releasing a bed.

File:
1 edited

Legend:

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

    r13276 r13315  
    317317        self.student['accommodation'].addBedTicket(bedticket)
    318318        self.app['hostels']['hall-1']['hall-1_A_101_D'].owner = self.student_id
     319        notify(grok.ObjectModifiedEvent(self.app['hostels']['hall-1']['hall-1_A_101_D']))
    319320        self.browser.open(self.container_path + '/hall-1/manage')
    320321        ctrl = self.browser.getControl(name='val_id')
     
    329330        self.assertMatches(bedticket.bed_coordinates,
    330331          u' -- booking cancelled on <YYYY-MM-DD hh:mm:ss> UTC --')
    331         # If we release a free be, nothing will happen.
     332        # The catalog was updated.
     333        results = cat.searchResults(owner=(self.student_id, self.student_id))
     334        assert len(results) == 0
     335        # If we release a free bed, nothing will happen.
    332336        ctrl = self.browser.getControl(name='val_id')
    333337        ctrl.getControl(value='hall-1_A_101_D').selected = True
Note: See TracChangeset for help on using the changeset viewer.