Changeset 9662 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 17 Nov 2012, 11:50:48 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_reports.py
r9653 r9662 1 1 # Tests for student related reports 2 from zope.interface.verify import verifyClass, verifyObject 2 3 from waeup.kofa.students.reports import ( 3 get_students_by, StudentsReport )4 get_students_by, StudentsReport, IStudentsReport) 4 5 from waeup.kofa.students.tests.test_catalog import CatalogTestSetup 5 6 from waeup.kofa.testing import FunctionalLayer … … 12 13 'clearance requested', 'cleared', 'school fee paid', 13 14 'returning', 'courses registered', 'courses validated', 'Total') 15 16 def test_iface(self): 17 # ensure we fullfill interface contracts 18 obj = StudentsReport(2010, 'Undergraduate Full-Time') 19 verifyClass(IStudentsReport, StudentsReport) 20 verifyObject(IStudentsReport, obj) 21 return 22 23 def test_repr(self): 24 # exec(students_report.__repr__()) <=> students_report 25 obj1 = StudentsReport(2010, 'Undergraduate Full-Time') 26 self.assertEqual( 27 obj1.__repr__(), 28 "StudentsReport(2010, 'Undergraduate Full-Time', author='System')") 29 obj_from_str = eval(obj1.__repr__()) 30 self.assertEqual(obj_from_str.session, '2010/2011') 31 self.assertEqual(obj_from_str.mode, 'Undergraduate Full-Time') 32 return 14 33 15 34 def test_get_students_by_session_simple(self):
Note: See TracChangeset for help on using the changeset viewer.