Ignore:
Timestamp:
28 Feb 2012, 19:34:51 (13 years ago)
Author:
Henrik Bettermann
Message:

Internationalize hostels package.

Remove exception catcher in switchReservations and corresponding test.

When testing the hostel configuration manually I found out that the beds_reserved list attribute of halls
only changed during the lifetime of a running instance. After restarting the portal all changes were gone.
Also "hostel._p_changed = True" didn't help. The only solution was to reassign the attribute to ensure persistance.

Unfortunately, the current tests don't catch such a malfunction. This has to be improved.

File:
1 edited

Legend:

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

    r7484 r7718  
    246246        assert self.app['hostels']['hall-1'][
    247247            'hall-1_A_101_D'].bed_type == 'regular_female_reserved'
    248         expected = 'name="form.beds_reserved.0." size="20" type="text" value="A_101_A"  />'
    249         self.assertTrue(expected in self.browser.contents)
    250         # Provoke exception
    251         self.app['hostels']['hall-1']['hall-1_A_101_D'].bed_type = u'nonsense'
    252         ctrl = self.browser.getControl(name='val_id')
    253         ctrl.getControl(value='hall-1_A_101_D').selected = True
    254         self.browser.getControl("Switch reservation", index=0).click()
    255         self.assertMatches(
    256             '...need more than 1 value to unpack...', self.browser.contents)
    257         self.app['hostels']['hall-1'][
    258             'hall-1_A_101_D'].bed_type = u'regular_female_reserved'
     248        self.assertTrue('<li>A_101_A</li>' in self.browser.contents)
    259249        # Change hostel configuration
    260250        hall.beds_for_all = ['D']
Note: See TracChangeset for help on using the changeset viewer.