Ignore:
Timestamp:
16 Dec 2015, 06:07:20 (9 years ago)
Author:
Henrik Bettermann
Message:

Use new ITranscriptApplicant interface for application.

Adjust importer and exporter.

File:
1 edited

Legend:

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

    r11755 r13544  
    1717##
    1818import grok
     19import datetime
     20import pytz
    1921from zope.event import notify
    2022from zope.component import createObject, getUtility
    2123from waeup.kofa.configuration import SessionConfiguration
     24from waeup.kofa.applicants.container import ApplicantsContainer
    2225from waeup.aaue.testing import FunctionalLayer
    2326from waeup.kofa.applicants.tests.test_browser import (
     
    6568                 'application/pdf')
    6669        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.