Changeset 8326 for main


Ignore:
Timestamp:
2 May 2012, 10:38:37 (13 years ago)
Author:
Henrik Bettermann
Message:

Customize StudentStudyLevel?, StudentStudyCourse? and CourseTicket? classes.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py

    r8270 r8326  
    2323from waeup.kofa.students.vocabularies import nats_vocab
    2424from waeup.kofa.students.interfaces import (
    25     IStudentBase,IUGStudentClearance,IPGStudentClearance,
    26     IStudentPersonal,IStudentNavigation,
     25    IStudentBase, IUGStudentClearance, IPGStudentClearance,
     26    IStudentPersonal, IStudentNavigation, IStudentStudyLevel,
     27    IStudentStudyCourse, ICourseTicket
    2728    )
    2829from waeup.kofa.students.vocabularies import (
     
    341342    """
    342343
     344class ICustomStudentStudyCourse(IStudentStudyCourse):
     345    """A container for student study levels.
     346
     347    """
     348
     349class ICustomStudentStudyLevel(IStudentStudyLevel):
     350    """A container for course tickets.
     351
     352    """
     353
    343354class ICustomStudentOnlinePayment(ICustomOnlinePayment):
    344355    """A student payment via payment gateways.
     
    355366ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
    356367    'p_session'].order
     368
     369class ICustomCourseTicket(ICourseTicket):
     370    """A course ticket.
     371
     372    """
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r8320 r8326  
    2121from hurry.workflow.interfaces import IWorkflowState
    2222from zope.component.hooks import setSite, clearSite
    23 from zope.component import getUtility
     23from zope.component import getUtility, createObject
     24from zope.interface import verify
    2425from waeup.kofa.app import University
    2526from waeup.kofa.students.tests.test_browser import StudentsFullSetup
     
    3031from waeup.uniben.testing import FunctionalLayer
    3132from waeup.uniben.students.utils import get_school_fee
     33from waeup.uniben.students.interfaces import (
     34    ICustomStudentStudyCourse, ICustomStudent,
     35    ICustomStudentStudyLevel, ICustomCourseTicket)
    3236
    3337
     
    99103    layer = FunctionalLayer
    100104
     105    def test_classes(self):
     106        # Let's see if objects created in the customized
     107        # portal really implement the customized interfaces
     108        verify.verifyObject(ICustomStudent, self.student)
     109        verify.verifyObject(
     110            ICustomStudentStudyCourse, self.student['studycourse'])
     111        studylevel = createObject(u'waeup.StudentStudyLevel')
     112        verify.verifyObject(ICustomStudentStudyLevel, studylevel)
     113        ticket = createObject(u'waeup.CourseTicket')
     114        verify.verifyObject(ICustomCourseTicket, ticket)
     115
    101116    def test_manage_access(self):
    102117        # Managers can access the pages of students
Note: See TracChangeset for help on using the changeset viewer.