Ignore:
Timestamp:
30 Apr 2014, 05:30:32 (11 years ago)
Author:
Henrik Bettermann
Message:

ExportPDFMatricNumberSlipPage and MatricNumberSlipActionButton? added.

File:
1 edited

Legend:

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

    r11605 r11607  
    2828from waeup.kofa.students.accommodation import BedTicket
    2929from waeup.kofa.testing import FunctionalTestCase
     30from waeup.kofa.browser.tests.test_pdf import samples_dir
    3031from waeup.aaue.testing import FunctionalLayer
    3132
     
    351352        self.student['studycourse'].certificate.study_mode = 'ug_pt'
    352353        self.browser.open(self.student_path)
     354        self.assertRaises(
     355            LinkNotFoundError,
     356            self.browser.getLink, 'Download matriculation number slip')
    353357        self.browser.getLink("Get Matriculation Number").click()
    354358        self.assertTrue('Matriculation number PTP/fac1/dep1/04/00001 assigned.'
     
    364368        self.assertTrue('E1000000 - waeup.aaue.students.browser.StudentGetMatricNumberPage - '
    365369                        'E1000000 - PTP/fac1/dep1/04/00001 assigned' in logcontent)
    366         return
    367 
     370        # Matric Number Slip can be downloaded
     371        self.browser.getLink("Download matriculation number slip").click()
     372        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     373        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     374        path = os.path.join(samples_dir(), 'transcript.pdf')
     375        open(path, 'wb').write(self.browser.contents)
     376        print "Sample PDF matric_number_slip.pdf written to %s" % path
     377        return
     378
Note: See TracChangeset for help on using the changeset viewer.