Changeset 12565 for main/waeup.kofa


Ignore:
Timestamp:
7 Feb 2015, 07:15:24 (10 years ago)
Author:
Henrik Bettermann
Message:

Application slip must be created again to correspond to the final slip version.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py

    r12395 r12565  
    151151        # Finally prove if an application slip can be created
    152152        try:
    153             applicant_slip = getAdapter(self, IPDF, name='application_slip')(
     153            test_applicant_slip = getAdapter(self, IPDF, name='application_slip')(
    154154                view=view)
    155155        except IOError:
     
    171171        notify(grok.ObjectModifiedEvent(student))
    172172        # Save application slip
     173        applicant_slip = getAdapter(self, IPDF, name='application_slip')(
     174            view=view)
    173175        self._saveApplicationPDF(student, applicant_slip, view=view)
    174176        return True, _('Student ${a} created', mapping = {'a':student.student_id})
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py

    r12395 r12565  
    2929from waeup.kofa.interfaces import IExtFileStore, IFileStoreNameChooser
    3030from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup
     31from waeup.kofa.browser.tests.test_pdf import samples_dir
    3132
    3233session = datetime.now().year - 2
     
    114115        self.assertTrue(len(pdf) > 0)
    115116        self.assertEqual(pdf[:8], '%PDF-1.4')
     117        # Copy te file to samples_dir
     118        path = os.path.join(samples_dir(), 'aplication_slip.pdf')
     119        open(path, 'wb').write(pdf)
     120        print "Sample PDF aplication_slip.pdf written to %s" % path
    116121        # Check if there is an application slip link in UI
    117122        self.assertTrue('Application Slip' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.