Changeset 7077 for main/waeup.sirp/trunk
- Timestamp:
- 11 Nov 2011, 09:02:15 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/hostels/tests.py
r7070 r7077 36 36 from waeup.sirp.students.student import Student 37 37 from waeup.sirp.students.accommodation import BedTicket 38 from waeup.sirp.university.department import Department 38 39 39 40 class HostelsContainerTestCase(FunctionalTestCase): … … 72 73 # We cannot call the fundamental methods of a base in that case 73 74 container = HostelsContainer() 75 hostel = Hostel() 74 76 self.assertRaises( 75 77 NotImplementedError, container.archive) 76 78 self.assertRaises( 77 79 NotImplementedError, container.clear) 80 # We cannot add arbitrary objects 81 department = Department() 82 self.assertRaises( 83 TypeError, container.addHostel, department) 84 self.assertRaises( 85 TypeError, hostel.addBed, department) 78 86 79 87 class HostelsFullSetup(FunctionalTestCase): -
main/waeup.sirp/trunk/src/waeup/sirp/students/container.py
r6906 r7077 53 53 """ 54 54 user = get_current_principal() 55 if user is None: 56 user = 'system' 57 else: 58 user = user.id 55 user = user.id 59 56 self.logger.info('%s - %s - %s - %s' % ( 60 57 user, ob_class, target, comment)) -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_container.py
r6659 r7077 24 24 from zope.component.hooks import setSite, clearSite 25 25 from waeup.sirp.app import University 26 from waeup.sirp.university.department import Department 26 27 from waeup.sirp.students.interfaces import ( 27 28 IStudentsContainer, … … 76 77 self.assertRaises( 77 78 NotImplementedError, container.clear) 79 # We cannot add arbitrary objects 80 department = Department() 81 self.assertRaises( 82 TypeError, container.addStudent, department) 83 78 84 79 85 def test_logger(self): -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_student.py
r6989 r7077 27 27 IStudentStudyLevel, ICourseTicket, IBedTicket) 28 28 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase 29 from waeup.sirp.university.department import Department 29 30 30 31 class StudentTest(FunctionalTestCase): … … 62 63 return 63 64 65 def test_base(self): 66 department = Department() 67 studycourse = StudentStudyCourse() 68 self.assertRaises( 69 TypeError, studycourse.addStudentStudyLevel, department) 70 studylevel = StudentStudyLevel() 71 self.assertRaises( 72 TypeError, studylevel.addCourseTicket, department) 73 64 74 class StudentFactoryTest(FunctionalTestCase): 65 75
Note: See TracChangeset for help on using the changeset viewer.