Ignore:
Timestamp:
27 Jun 2012, 14:01:32 (13 years ago)
Author:
Henrik Bettermann
Message:

Catch error if certificate has been removed between application submission and student creation.

File:
1 edited

Legend:

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

    r8667 r8843  
    6767        self.browser.getControl(name="form.course_admitted").value = ['CERT1']
    6868        self.browser.getControl("Save").click()
     69        # Maybe the certificate has meanwhile been removed
     70        del self.app['faculties']['fac1']['dep1'].certificates['CERT1']
     71        (success, msg) = self.applicant.createStudent()
     72        self.assertFalse(success)
     73        self.assertTrue('ConstraintNotSatisfied: CERT1' in msg)
     74        # Ok, lets add the certificate and try again
     75        self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
     76            self.certificate)
    6977        (success, msg) = self.applicant.createStudent()
    7078        self.assertTrue('created' in msg)
Note: See TracChangeset for help on using the changeset viewer.