Ignore:
Timestamp:
10 Dec 2013, 08:40:03 (11 years ago)
Author:
Henrik Bettermann
Message:

Adjust tests.

Location:
main/waeup.uniben/trunk/src/waeup/uniben
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py

    r9869 r10836  
    1717##
    1818import os
     19from datetime import datetime
    1920from zope.component import createObject, getUtility
    2021from zope.catalog.interfaces import ICatalog
     
    381382    def setUp(self):
    382383        super(InterswitchTestsApplicants, self).setUp()
     384        configuration = SessionConfiguration()
     385        configuration.academic_session = datetime.now().year - 2
     386        self.app['configuration'].addSessionConfiguration(configuration)
    383387        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    384388        self.browser.open(self.manage_path)
     
    395399        #value = ctrl.options[0]
    396400        #self.browser.getLink(value).click()
     401        self.payment_url = self.browser.url
     402
     403    def test_interswitch_form(self):
    397404        self.assertMatches('...Amount Authorized...',
    398405                           self.browser.contents)
     
    400407            '...<span>1000.0</span>...',
    401408            self.browser.contents)
    402         self.payment_url = self.browser.url
    403 
    404 
    405     def test_interswitch_form(self):
    406 
    407409        # Manager can access InterswitchForm
    408410        self.browser.getLink("CollegePAY", index=0).click()
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r10740 r10836  
    3737
    3838
    39 class StudentProcessorTest(FunctionalTestCase):
    40     """Perform some batching tests.
    41     """
    42 
    43     layer = FunctionalLayer
    44 
    45     def setUp(self):
    46         super(StudentProcessorTest, self).setUp()
    47         # Setup a sample site for each test
    48         app = University()
    49         self.dc_root = tempfile.mkdtemp()
    50         app['datacenter'].setStoragePath(self.dc_root)
    51 
    52         # Prepopulate the ZODB...
    53         self.getRootFolder()['app'] = app
    54         # we add the site immediately after creation to the
    55         # ZODB. Catalogs and other local utilities are not setup
    56         # before that step.
    57         self.app = self.getRootFolder()['app']
    58         # Set site here. Some of the following setup code might need
    59         # to access grok.getSite() and should get our new app then
    60         setSite(app)
    61 
    62 
    63     def tearDown(self):
    64         super(StudentProcessorTest, self).tearDown()
    65         shutil.rmtree(self.workdir)
    66         shutil.rmtree(self.dc_root)
    67         clearSite()
    68         return
    69 
    7039class StudentUITests(StudentsFullSetup):
    7140    """Tests for customized student class views and pages
Note: See TracChangeset for help on using the changeset viewer.