Ignore:
Timestamp:
1 Sep 2016, 15:33:23 (8 years ago)
Author:
Henrik Bettermann
Message:

Implement screening invitation letter.

File:
1 edited

Legend:

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

    r14064 r14147  
    168168        return
    169169
    170     def test_application_slip(self):
     170    def test_application_slips(self):
    171171
    172172        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     
    185185        open(path, 'wb').write(self.browser.contents)
    186186        print "Sample application_slip.pdf written to %s" % path
     187        # Screening invitation letter is not yet available
     188        self.browser.open(self.view_path)
     189        self.assertFalse('invitation slip' in self.browser.contents)
     190        self.browser.open(self.view_path + '/screening_invitation_slip.pdf')
     191        self.assertTrue('Forbidden' in self.browser.contents)
     192        self.applicant.screening_date = u'any date'
     193        # The invitation letter can be printed
     194        self.browser.open(self.view_path)
     195        self.browser.getLink("invitation").click()
     196        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     197        self.assertEqual(self.browser.headers['Content-Type'],
     198                         'application/pdf')
     199        path = os.path.join(samples_dir(), 'screening_invitation_slip.pdf')
     200        open(path, 'wb').write(self.browser.contents)
     201        print "Sample screening_invitation_slip.pdf written to %s" % path
    187202
    188203    def test_akoka_application_slip(self):
Note: See TracChangeset for help on using the changeset viewer.