Ignore:
Timestamp:
19 Dec 2011, 12:34:33 (13 years ago)
Author:
uli
Message:

Finetune copier tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_applicantcopier.py

    r7387 r7394  
    7979        file_len = len(fd.read())
    8080        self.assertEqual(file_len_orig, file_len)
    81         # Check if application slip exists
     81        # Check if application slip exists and is a PDF file
    8282        file_id = IFileStoreNameChooser(
    83             student).chooseName(attr='application_slip')
     83            student).chooseName(attr='application_slip.pdf')
     84        pdf = storage.getFile(file_id).read()
     85        self.assertTrue(len(pdf) > 0)
     86        self.assertEqual(pdf[:8], '%PDF-1.4')
     87        # Check if there is an application slip link in UI
    8488        self.assertTrue('Applicant Slip' in self.browser.contents)
    8589        self.browser.getLink("Applicant Slip").click()
Note: See TracChangeset for help on using the changeset viewer.