Changeset 9137 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 31 Aug 2012, 20:19:08 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_student.py
r9136 r9137 267 267 self.assertRaises( 268 268 RequiredMissing, self.student.transfer, self.certificate2) 269 success = self.student.transfer(self.certificate2, 270 current_session=2013) 269 error = self.student.transfer(self.certificate2, current_session=1000) 270 self.assertTrue(error == -1) 271 error = self.student.transfer(self.certificate2, current_session=2013) 272 self.assertTrue(error == None) 271 273 self.assertEqual(self.student['studycourse_1'].certificate.code, 'CERT1') 272 274 self.assertEqual(self.student['studycourse'].certificate.code, 'CERT2') … … 281 283 self.assertTrue('system - K1000000 - transferred from CERT1 to CERT2' 282 284 in logcontent) 285 messages = ' '.join(self.student.history.messages) 286 self.assertMatches( 287 '...<YYYY-MM-DD hh:mm:ss> UTC - ' 288 'Transferred from CERT1 to CERT2 by system', messages) 283 289 284 290 # The students_catalog has been updated. … … 297 303 298 304 # Students can be transferred (only) two times. 299 success= self.student.transfer(self.certificate,305 error = self.student.transfer(self.certificate, 300 306 current_session=2013) 301 self.assertTrue( success)302 success= self.student.transfer(self.certificate2,307 self.assertTrue(error == None) 308 error = self.student.transfer(self.certificate2, 303 309 current_session=2013) 304 self.assert False(success)310 self.assertTrue(error == -2) 305 311 self.assertEqual([i for i in self.student.keys()], 306 312 [u'accommodation', u'payments', u'studycourse',
Note: See TracChangeset for help on using the changeset viewer.