Ignore:
Timestamp:
6 Nov 2015, 05:43:37 (9 years ago)
Author:
Henrik Bettermann
Message:

Implement portal maintenance mode.

File:
1 edited

Legend:

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

    r12868 r13394  
    351351        self.browser.getControl('Upload').click()
    352352        self.browser.getLink('Process data').click()
     353        self.assertTrue('Portal must be in maintenance mode for data import.'
     354            in self.browser.contents)
     355        self.browser.getLink("Switch").click()
     356        self.assertTrue('Maintenance mode enabled' in self.browser.contents)
     357        # Maintenance mode is now set.
     358        self.assertEqual(
     359            self.app['configuration'].maintmode_enabled_by, 'zope.mgr')
     360        self.browser.getLink('Process data').click()
    353361        self.browser.getControl(name="select").click()
    354362        importerselect = self.browser.getControl(name='importer')
     
    360368        self.browser.getControl('Perform import').click()
    361369        self.assertTrue('Successfully processed 1 rows' in self.browser.contents)
     370        self.assertTrue('Maintenance mode disabled' in self.browser.contents)
     371        # Maintenance mode is really disabled.
     372        self.assertEqual(
     373            self.app['configuration'].maintmode_enabled_by, None)
    362374        # We import the same file a second time.
    363375        self.browser.open(self.datacenter_path)
Note: See TracChangeset for help on using the changeset viewer.