Ignore:
Timestamp:
14 Jan 2016, 14:41:20 (9 years ago)
Author:
Henrik Bettermann
Message:

Add NILS application type and category and customize slip.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py

    r13558 r13615  
    291291                container_title, ar_translation,
    292292                self.context.application_number)
    293         if 'afak' in self.target:
     293        elif 'afak' in self.target:
    294294            return 'Federal College of Education (Technical) Akoka - %s %s %s' % (
     295                container_title, ar_translation,
     296                self.context.application_number)
     297        elif self.target == 'pgn':
     298            return 'National Institute for Legislative Studies (NILS) - %s %s %s' % (
    295299                container_title, ar_translation,
    296300                self.context.application_number)
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py

    r13558 r13615  
    203203        open(path, 'wb').write(self.browser.contents)
    204204        print "Sample akoka_application_slip.pdf written to %s" % path
     205
     206    def test_nils_application_slip(self):
     207
     208        # Remove required FieldProperty attribute first ...
     209        #delattr(ApplicantsContainer, 'prefix')
     210        # ... and replace by akoka
     211        self.applicantscontainer.prefix = 'pgn'
     212        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     213        self.slip_path = self.view_path + '/application_slip.pdf'
     214        self.browser.open(self.manage_path)
     215        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     216        self.fill_correct_values()
     217        self.browser.getControl("Save").click()
     218        IWorkflowState(self.applicant).setState('submitted')
     219        self.browser.open(self.manage_path)
     220        self.browser.getLink("Download application slip").click()
     221        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     222        self.assertEqual(self.browser.headers['Content-Type'],
     223                         'application/pdf')
     224        path = os.path.join(samples_dir(), 'nils_application_slip.pdf')
     225        open(path, 'wb').write(self.browser.contents)
     226        print "Sample nils_application_slip.pdf written to %s" % path
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py

    r13557 r13615  
    4646        'pgc': ['Postgraduate Programmes (3rd supplementary advert)', 'PG'],
    4747        'pgd': ['Postgraduate Programmes (4th supplementary advert)', 'PG'],
     48        'pgn': ['NILS Postgraduate Programmes', 'PG'],
    4849        'pre': ['Pre-Degree Studies', 'PRE'],
    4950        'cbt': ['UNIBEN CBT Practice Test', 'CBT'],
  • main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py

    r13576 r13615  
    4545        'pgc': 'Postgraduate (3rd supplementary advert)',
    4646        'pgd': 'Postgraduate (4th supplementary advert)',
     47        'pgnils': 'Postgraduate NILS',
    4748        'pg_ft': 'Postgraduate Full-Time (deprecated)',
    4849        'pg_pt': 'Postgraduate Part-Time (deprecated)',
Note: See TracChangeset for help on using the changeset viewer.