Changeset 10257


Ignore:
Timestamp:
30 May 2013, 18:51:15 (12 years ago)
Author:
Henrik Bettermann
Message:

Create real pdf file during test.

File:
1 edited

Legend:

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

    r10256 r10257  
    2323import pytz
    2424import base64
    25 from datetime import datetime, timedelta
     25from datetime import datetime, timedelta, date
    2626from StringIO import StringIO
    2727import os
     
    4848from waeup.kofa.hostels.hostel import Hostel, Bed, NOT_OCCUPIED
    4949from waeup.kofa.tests.test_async import FunctionalAsyncTestCase
     50from waeup.kofa.browser.tests.test_pdf import samples_dir
    5051
    5152PH_LEN = 15911  # Length of placeholder file
     
    18121813
    18131814    def test_transcrtipts(self):
     1815        self.student.date_of_birth = date(1981, 2, 4)
    18141816        studylevel = createObject(u'waeup.StudentStudyLevel')
    18151817        studylevel.level = 100
    18161818        studylevel.level_session = 2005
     1819        self.student['studycourse'].entry_mode = 'ug_ft'
    18171820        self.student['studycourse'].addStudentStudyLevel(
    18181821            self.certificate, studylevel)
     
    18451848        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    18461849        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     1850        path = os.path.join(samples_dir(), 'transcript.pdf')
     1851        open(path, 'wb').write(self.browser.contents)
    18471852
    18481853class StudentUITests(StudentsFullSetup):
Note: See TracChangeset for help on using the changeset viewer.