Changeset 7348


Ignore:
Timestamp:
15 Dec 2011, 06:25:58 (13 years ago)
Author:
Henrik Bettermann
Message:

Add regression test which shows that we can't view applicants after removing the certificate.

File:
1 edited

Legend:

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

    r7322 r7348  
    325325        # Change course_admitted
    326326        self.browser.open(self.manage_path)
    327         self.browser.getControl(name="form.course_admitted").value = []
     327        self.browser.getControl(name="form.course_admitted").value = ['CERT1']
    328328        self.browser.getControl("Save").click()
    329329        self.assertMatches('...Form has been saved...', self.browser.contents)
     
    341341        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    342342        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     343        # Managers can view applicants even if certificate has been removed
     344        del self.app['faculties']['fac1']['dep1'].certificates['CERT1']
     345        self.browser.open(self.view_path)
     346        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     347        self.browser.open(self.slip_path)
     348        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    343349        return
    344350
Note: See TracChangeset for help on using the changeset viewer.