Ignore:
Timestamp:
30 Mar 2017, 07:51:15 (8 years ago)
Author:
Henrik Bettermann
Message:

Implement ExportExaminationScheduleSlip?.

File:
1 edited

Legend:

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

    r14613 r14661  
    12401240            '...Successfully added COURSE2...', self.browser.contents)
    12411241        return
     1242
     1243    def test_examination_schedule_slip(self):
     1244        self.student.flash_notice = u'My Examination Date'
     1245        self.browser.open(self.login_path)
     1246        self.browser.getControl(name="form.login").value = self.student_id
     1247        self.browser.getControl(name="form.password").value = 'spwd'
     1248        self.browser.getControl("Login").click()
     1249        self.browser.getLink("Download examination schedule slip").click()
     1250        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     1251        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     1252        path = os.path.join(samples_dir(), 'examination_schedule_slip.pdf')
     1253        open(path, 'wb').write(self.browser.contents)
     1254        print "Sample PDF examination_schedule_slip.pdf written to %s" % path
     1255        # If flash_notive does not contain exam' the button does not show up.
     1256        self.student.flash_notice = u'anything'
     1257        self.browser.open(self.student_path)
     1258        self.assertFalse('examination schedule slip' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.