- Timestamp:
- 15 Jun 2012, 06:48:10 (12 years ago)
- Location:
- main/waeup.futminna/trunk/src/waeup/futminna
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna
- Property svn:mergeinfo changed
/main/waeup.uniben/trunk/src/waeup/uniben merged: 8727
- Property svn:mergeinfo changed
-
main/waeup.futminna/trunk/src/waeup/futminna/applicants/tests.py
r8670 r8730 25 25 from zope.intid.interfaces import IIntIds 26 26 from zope.interface.verify import verifyClass, verifyObject 27 from zope.schema.interfaces import ConstraintNotSatisfied 27 28 from zope.component.hooks import setSite, clearSite 28 29 from zope.component import createObject, getUtility … … 149 150 150 151 def test_manage_and_view_applicant(self): 151 # Managers can manage pg applicants 152 # Managers can manage pg applicants. 152 153 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 153 # The IPGApplicant interface is really used in all pages 154 # The IPGApplicant interface is really used in all pages. 154 155 self.browser.open(self.pgapplicant_path) 155 156 self.assertEqual(self.browser.headers['Status'], '200 Ok') … … 164 165 self.assertEqual(self.browser.headers['Status'], '200 Ok') 165 166 # If we view the applicant in the ug container, 166 # the employer field doesn't appear 167 # the employer field doesn't appear. 167 168 self.browser.open(self.ugapplicant_path) 168 169 self.assertEqual(self.browser.headers['Status'], '200 Ok') … … 170 171 self.browser.open(self.ugapplicant_path + '/manage') 171 172 self.assertEqual(self.browser.headers['Status'], '200 Ok') 172 # We can save the applicant 173 # We can save the applicant. 173 174 self.fill_correct_values() 174 175 self.browser.getControl(name="form.course1").value = ['CERT1'] … … 181 182 self.browser.open(self.ugapplicant_path + '/application_slip.pdf') 182 183 self.assertEqual(self.browser.headers['Status'], '200 Ok') 184 return 185 186 def test_set_wrong_course1(self): 187 self.ugapplicant.course1 = self.certificate 188 self.assertRaises( 189 ConstraintNotSatisfied, 190 setattr, self.ugapplicant, 'course1', self.certificate2) 191 self.pgapplicant.course1 = self.certificate2 192 self.assertRaises( 193 ConstraintNotSatisfied, 194 setattr, self.pgapplicant, 'course1', self.certificate) 183 195 return 184 196
Note: See TracChangeset for help on using the changeset viewer.