Ignore:
Timestamp:
22 Sep 2011, 12:30:15 (13 years ago)
Author:
Henrik Bettermann
Message:

Application is only allowed between start and end time. Show dates on login page and logout applicants if current time exceeds these limits.

File:
1 edited

Legend:

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

    r6632 r6816  
    2626import tempfile
    2727from StringIO import StringIO
    28 from datetime import datetime
     28from datetime import datetime, date, timedelta
    2929from mechanize import LinkNotFoundError
    3030from zope.component import createObject
     
    8383        applicantscontainer.year = 2009
    8484        applicantscontainer.application_category = 'basic'
     85        delta = timedelta(days=10)
     86        applicantscontainer.startdate = date.today() - delta
     87        applicantscontainer.enddate = date.today() + delta
    8588        self.app['applicants']['app2009'] = applicantscontainer
    8689
     
    350353        appl = appl[pin]
    351354        passp = appl.passport
    352         #import pdb; pdb.set_trace()
    353355        passp_len = len(passp.file.read())
    354356        self.assertEqual(passp_len, PH_LEN)
     
    456458        applicantscontainer = ApplicantsContainer()
    457459        applicantscontainer.ac_prefix = 'APP'
     460        delta = timedelta(days=10)
     461        applicantscontainer.startdate = date.today() - delta
     462        applicantscontainer.enddate = date.today() + delta
    458463        app['applicants']['testapplicants'] = applicantscontainer
    459464
     
    629634    def test_after_login_default_browsable(self):
    630635        # After login we see the placeholder image in the edit view
     636        #import pdb; pdb.set_trace()
    631637        self.login()
    632638        self.assertEqual(self.browser.url, self.edit_path)
Note: See TracChangeset for help on using the changeset viewer.