Ignore:
Timestamp:
2 Dec 2015, 20:15:36 (9 years ago)
Author:
Henrik Bettermann
Message:

Require maintenance mode for bed updates and expired bed allocation releases.

File:
1 edited

Legend:

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

    r13484 r13529  
    201201        self.assertEqual(len(results), 1)
    202202        self.browser.open(self.container_path + '/releaseexpired')
     203        self.assertTrue('Portal must be in maintenance mode for releasing expired bed allocations'
     204            in self.browser.contents)
     205        grok.getSite()['configuration'].maintmode_enabled_by = u'any_id'
     206        self.browser.open(self.container_path + '/releaseexpired')
    203207        self.assertTrue('No bed released' in self.browser.contents)
    204208        delta = timedelta(days=10)
     
    339343        hall.beds_for_final = ['C']
    340344        hall.beds_for_all = ['D','E']
     345        self.browser.getControl("Update all beds").click()
     346        self.assertTrue('Portal must be in maintenance mode for bed updates'
     347            in self.browser.contents)
     348        grok.getSite()['configuration'].maintmode_enabled_by = u'any_id'
    341349        self.browser.getControl("Update all beds").click()
    342350        expected = '...0 empty beds removed, 10 beds added, 0 occupied beds modified ()...'
     
    507515
    508516    def test_clear_hostels(self):
     517        grok.getSite()['configuration'].maintmode_enabled_by = u'any_id'
    509518        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    510519        self.browser.open(self.container_path)
Note: See TracChangeset for help on using the changeset viewer.