Changeset 13544 for main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests
- Timestamp:
- 16 Dec 2015, 06:07:20 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py
r11755 r13544 17 17 ## 18 18 import grok 19 import datetime 20 import pytz 19 21 from zope.event import notify 20 22 from zope.component import createObject, getUtility 21 23 from waeup.kofa.configuration import SessionConfiguration 24 from waeup.kofa.applicants.container import ApplicantsContainer 22 25 from waeup.aaue.testing import FunctionalLayer 23 26 from waeup.kofa.applicants.tests.test_browser import ( … … 65 68 'application/pdf') 66 69 return 70 71 def test_transcript_application_manage(self): 72 # Add trans applicants container 73 self.transcontainer = ApplicantsContainer() 74 self.transcontainer.mode = 'create' 75 self.transcontainer.code = u'trans%s' % session_1 76 self.transcontainer.prefix = u'trans' 77 self.transcontainer.application_category = u'no' 78 self.transcontainer.year = session_1 79 self.transcontainer.application_fee = 300.0 80 self.transcontainer.title = u'This is the trans%s container' % session_1 81 self.app['applicants'][self.transcontainer.code] = self.transcontainer 82 delta = datetime.timedelta(days=10) 83 self.transcontainer.startdate = datetime.datetime.now(pytz.utc) - delta 84 self.transcontainer.enddate = datetime.datetime.now(pytz.utc) + delta 85 # Add applicant 86 transapplicant = createObject(u'waeup.Applicant') 87 transapplicant.firstname = u'Anna' 88 transapplicant.lastname = u'Post' 89 self.app['applicants'][self.transcontainer.code].addApplicant(transapplicant) 90 self.transapplication_number = transapplicant.application_number 91 self.transapplicant = self.app['applicants'][self.transcontainer.code][ 92 self.transapplication_number] 93 self.transapplicant_path = ('http://localhost/app/applicants/trans%s/%s' 94 % (session_1, self.transapplication_number)) 95 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 96 self.browser.open(self.transapplicant_path) 97 self.assertEqual(self.browser.headers['Status'], '200 Ok') 98 self.assertTrue("Dispatch Address" in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.