Ignore:
Timestamp:
26 Aug 2011, 10:10:18 (13 years ago)
Author:
Henrik Bettermann
Message:

We don't need a factory for StudentsContainer?.

Add addStudent method which automatically creates subcontainers.

Add StudentStudyCourse? container class which holds the study course data and contains student study level objects for course registration.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_container.py

    r6621 r6633  
    2525    )
    2626from waeup.sirp.students.container import (
    27     StudentsContainer, StudentsContainerFactory,
     27    StudentsContainer,
    2828    )
    2929from waeup.sirp.testing import FunctionalLayer
     
    5050        self.assertRaises(
    5151            NotImplementedError, container.clear)
    52 
    53 class StudentsContainerFactoryTest(FunctionalTestCase):
    54 
    55     layer = FunctionalLayer
    56 
    57     def setUp(self):
    58         self.factory = StudentsContainerFactory()
    59 
    60     def tearDown(self):
    61         pass
    62 
    63     def test_interfaces(self):
    64         verifyClass(IFactory, StudentsContainerFactory)
    65         verifyObject(IFactory, self.factory)
    66 
    67     def test_factory(self):
    68         obj = self.factory()
    69         assert isinstance(obj, StudentsContainer)
    70 
    71     def test_getInterfaces(self):
    72         implemented_by = self.factory.getInterfaces()
    73         assert implemented_by.isOrExtends(IStudentsContainer)
  • main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_student.py

    r6632 r6633  
    3030    Student, StudentFactory,
    3131    )
     32from waeup.sirp.students.studycourse import (
     33    StudentStudyCourse,
     34    )
    3235from waeup.sirp.students.interfaces import (
    33     IStudent,
     36    IStudent, IStudentStudyCourse,
    3437    )
    3538from waeup.sirp.testing import FunctionalLayer
     
    4245        super(StudentTest, self).setUp()
    4346        self.student = Student()
     47        self.studycourse = StudentStudyCourse()
    4448        return
    4549
     
    5155        verify.verifyClass(IStudent, Student)
    5256        verify.verifyObject(IStudent, self.student)
     57        verify.verifyClass(IStudentStudyCourse, StudentStudyCourse)
     58        verify.verifyObject(IStudentStudyCourse, self.studycourse)
    5359        return
    5460
Note: See TracChangeset for help on using the changeset viewer.