Ignore:
Timestamp:
12 Dec 2011, 07:01:54 (13 years ago)
Author:
Henrik Bettermann
Message:

Rename certificatecontainer, coursecontainer and facultycontainer. Now we have e.g. a container for faculties. Synonyms are 'facultiescontainer', 'faculties', 'academics' or 'Academic Section'. The faculty container is the faculty itself which contains the departments.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
14 edited
10 moved

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/app.txt

    r7321 r7333  
    2121     An arbitrary object containing "faculties". In the case of
    2222     `University` it is a container of type
    23      `waeup.sirp.interfaces.IFacultyContainer`.
     23     `waeup.sirp.interfaces.IFacultiesContainer`.
    2424
    2525
     
    5959
    6060    >>> myuniversity['faculties']
    61     <waeup.sirp.university.facultycontainer.FacultyContainer object at 0x...>
     61    <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
    6262
    6363  >>> myuniversity['students']
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/breadcrumbs.py

    r7321 r7333  
    109109        return (self.context, 'administration')
    110110
    111 class FacultyContainerBreadcrumb(Breadcrumb):
     111class FacultiesContainerBreadcrumb(Breadcrumb):
    112112    """A breadcrumb for faculty containers.
    113113    """
    114     grok.context(interfaces.IFacultyContainer)
     114    grok.context(interfaces.IFacultiesContainer)
    115115    title = u'Academics'
    116116
     
    179179    grok.context(interfaces.ICertificate)       
    180180
    181 class CourseContainerBreadcrumb(Breadcrumb):
     181class CoursesContainerBreadcrumb(Breadcrumb):
    182182    """ We don't want course container breadcrumbs.
    183183    """
    184     grok.context(interfaces.ICourseContainer)
     184    grok.context(interfaces.ICoursesContainer)
    185185    grok.implements(IBreadcrumbIgnorable)
    186186
    187 class CertificateContainerBreadcrumb(Breadcrumb):
     187class CertificatesContainerBreadcrumb(Breadcrumb):
    188188    """ We don't want course container breadcrumbs.
    189189    """
    190     grok.context(interfaces.ICertificateContainer)
     190    grok.context(interfaces.ICertificatesContainer)
    191191    grok.implements(IBreadcrumbIgnorable)
    192192
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt

    r7321 r7333  
    517517--------------
    518518
    519 Courses are stored in :class:`ICourseContainer` instances with their
    520 code as key. CourseContainers are normally availabe as `course`
     519Courses are stored in :class:`ICoursesContainer` instances with their
     520code as key. CoursesContainers are normally availabe as `course`
    521521attribute of :class:`waeup.sirp.university.department.Department`
    522522instances.
    523523
    524524To ease the life of users we do not require to browse the
    525 coursecontainers (which have a rather flat user interface), but
     525coursescontainers (which have a rather flat user interface), but
    526526provide adding of courses in department views.
    527527
     
    728728-------------------
    729729
    730 Certificates are stored in :class:`ICertificateContainer` instances
    731 with their code as key. CertificateContainers are normally availabe as
     730Certificates are stored in :class:`ICertificatesContainer` instances
     731with their code as key. CertificatesContainers are normally availabe as
    732732`certificates` attribute of
    733733:class:`waeup.sirp.university.department.Department` instances.
    734734
    735735To ease the life of users we do not require to browse the
    736 certificatecontainers (which have in fact no user interface), but
     736certificatescontainers (which have in fact no user interface), but
    737737provide adding of certificates in department views.
    738738
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/interfaces.py

    r7321 r7333  
    2323    ISIRPObject, IUniversity, IUsersContainer, IDataCenter)
    2424from waeup.sirp.university.interfaces import (
    25     IFacultyContainer, IFaculty, IFacultyAdd, IDepartment, IDepartmentAdd,
    26     ICourseContainer, ICourse, ICourseAdd, ICertificateContainer,
     25    IFacultiesContainer, IFaculty, IFacultyAdd, IDepartment, IDepartmentAdd,
     26    ICoursesContainer, ICourse, ICourseAdd, ICertificatesContainer,
    2727    ICertificate, ICertificateAdd, ICertificateCourse, ICertificateCourseAdd)
    2828
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r7328 r7333  
    4141    SIRPDisplayFormPage, NullValidator)
    4242from waeup.sirp.browser.interfaces import (
    43     IUniversity, IFacultyContainer, IFaculty, IFacultyAdd,
     43    IUniversity, IFacultiesContainer, IFaculty, IFacultyAdd,
    4444    IDepartment, IDepartmentAdd, ICourse, ICourseAdd, ICertificate,
    4545    ICertificateAdd, ICertificateCourse, ICertificateCourseAdd)
     
    539539    """General search page for the academics section.
    540540    """
    541     grok.context(IFacultyContainer)
     541    grok.context(IFacultiesContainer)
    542542    grok.name('search')
    543543    grok.template('searchpage')
     
    11731173
    11741174#
    1175 # FacultyContainer pages...
    1176 #
    1177 
    1178 class FacultyContainerPage(SIRPPage):
     1175# FacultiesContainer pages...
     1176#
     1177
     1178class FacultiesContainerPage(SIRPPage):
    11791179    """ Index page for faculty containers.
    11801180    """
    1181     grok.context(IFacultyContainer)
     1181    grok.context(IFacultiesContainer)
    11821182    grok.require('waeup.viewAcademics')
    11831183    grok.name('index')
     
    11871187    grok.template('facultypage')
    11881188
    1189 class FacultyContainerManageFormPage(SIRPEditFormPage):
     1189class FacultiesContainerManageFormPage(SIRPEditFormPage):
    11901190    """Manage the basic properties of a `Faculty` instance.
    11911191    """
    1192     grok.context(IFacultyContainer)
     1192    grok.context(IFacultiesContainer)
    11931193    grok.name('manage')
    11941194    grok.require('waeup.manageUniversity')
    1195     grok.template('facultycontainermanagepage')
     1195    grok.template('facultiescontainermanagepage')
    11961196    pnav = 1
    11971197    taboneactions = ['Add faculty', 'Remove selected','Cancel']
     
    12061206        tabs.need()
    12071207        warning.need()
    1208         return super(FacultyContainerManageFormPage, self).update()
     1208        return super(FacultiesContainerManageFormPage, self).update()
    12091209
    12101210    @jsaction('Remove selected')
     
    12271227    """ Page form to add a new faculty to a faculty container.
    12281228    """
    1229     grok.context(IFacultyContainer)
     1229    grok.context(IFacultiesContainer)
    12301230    grok.require('waeup.manageUniversity')
    12311231    grok.name('add')
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py

    r7321 r7333  
    2222from zope.traversing.browser import absoluteURL
    2323from waeup.sirp.browser.pages import (
    24     UniversityPage, FacultyContainerPage, DatacenterPage, FacultyPage,
     24    UniversityPage, FacultiesContainerPage, DatacenterPage, FacultyPage,
    2525    DepartmentPage, CoursePage, CertificatePage, CertificateCoursePage,
    2626    UsersContainerPage, UserManageFormPage)
    2727from waeup.sirp.browser.interfaces import (
    28     IFacultyContainer, IFaculty, IDepartment, ICourse, ICertificate,
     28    IFacultiesContainer, IFaculty, IDepartment, ICourse, ICertificate,
    2929    ICertificateCourse, IBreadcrumbContainer, IUniversity, IUsersContainer)
    3030from waeup.sirp.interfaces import (ISIRPObject, ISIRPXMLExporter,
     
    396396    text = 'Edit settings'
    397397
    398 class ManageFacultyContainerActionButton(ManageActionButton):
     398class ManageFacultiesContainerActionButton(ManageActionButton):
    399399    """ 'Manage settings' button for faculties.
    400400    """
    401     grok.context(IFacultyContainer)
    402     grok.view(FacultyContainerPage)
     401    grok.context(IFacultiesContainer)
     402    grok.view(FacultiesContainerPage)
    403403    text = 'Manage academic section'
    404404
    405 class SearchFacultyContainerActionButton(ManageActionButton):
     405class SearchFacultiesContainerActionButton(ManageActionButton):
    406406    """ 'Manage settings' button for faculties.
    407407    """
    408     grok.context(IFacultyContainer)
    409     grok.view(FacultyContainerPage)
     408    grok.context(IFacultiesContainer)
     409    grok.view(FacultiesContainerPage)
    410410    text = 'Search academic section'
    411411    icon = 'actionicon_search.png'
     
    468468
    469469#class AddFacultyActionButton(AddActionButton):
    470 #    grok.context(IFacultyContainer)
    471 #    grok.view(FacultyContainerPage)
     470#    grok.context(IFacultiesContainer)
     471#    grok.view(FacultiesContainerPage)
    472472#    text = 'Add faculty'
    473473   
     
    504504
    505505#class RemoveFacultyActionButton(RemoveActionButton):
    506 #    grok.context(IFacultyContainer)
    507 #    grok.view(FacultyContainerPage)
     506#    grok.context(IFacultiesContainer)
     507#    grok.view(FacultiesContainerPage)
    508508#    text = 'Remove faculty'
    509509   
     
    715715
    716716
    717 class FacultyContainerListHead(grok.Viewlet):
     717class FacultiesContainerListHead(grok.Viewlet):
    718718    """The header line of faculty container subobject lists.
    719719    """
    720720    grok.order(1)
    721721    grok.viewletmanager(SubobjectLister)
    722     grok.context(IFacultyContainer)
     722    grok.context(IFacultiesContainer)
    723723    grok.require('waeup.viewAcademics')
    724724
  • main/waeup.sirp/trunk/src/waeup/sirp/university/__init__.py

    r7137 r7333  
    11# Make this a package.
    22from waeup.sirp.university.course import Course
    3 from waeup.sirp.university.coursecontainer import CourseContainer
     3from waeup.sirp.university.coursescontainer import CoursesContainer
    44from waeup.sirp.university.faculty import Faculty
    5 from waeup.sirp.university.facultycontainer import FacultyContainer
     5from waeup.sirp.university.facultiescontainer import FacultiesContainer
    66__all__ = (
    7     'Course', 'CourseContainer', 'Faculty', 'FacultyContainer')
     7    'Course', 'CoursesContainer', 'Faculty', 'FacultiesContainer')
  • main/waeup.sirp/trunk/src/waeup/sirp/university/api.txt

    r5978 r7333  
    1515
    1616   certificate.txt
    17    certificatecontainer.txt
     17   certificatescontainer.txt
    1818   course.txt
    19    coursecontainer.txt
     19   coursescontainer.txt
    2020   department.txt
    2121   faculty.txt
    22    facultycontainer.txt
     22   facultiescontainer.txt
    2323
    2424Additional infos about the referrers of courses and how they are
  • main/waeup.sirp/trunk/src/waeup/sirp/university/batching.py

    r7195 r7333  
    2828from waeup.sirp.interfaces import IBatchProcessor
    2929from waeup.sirp.university.interfaces import (
    30     IFacultyContainer, IFaculty, ICourse, IDepartment, ICertificate,
     30    IFacultiesContainer, IFaculty, ICourse, IDepartment, ICertificate,
    3131    ICertificateCourse)
    3232from waeup.sirp.utils.batching import BatchProcessor
  • main/waeup.sirp/trunk/src/waeup/sirp/university/certificatescontainer.py

    r7331 r7333  
    2525from waeup.sirp.interfaces import DuplicationError
    2626from waeup.sirp.university.interfaces import (
    27     ICertificateContainer, ICertificate)
     27    ICertificatesContainer, ICertificate)
    2828
    29 class CertificateContainer(grok.Container):
     29class CertificatesContainer(grok.Container):
    3030    """A storage for certificates.
    3131
    32     A :class:`CertificateContainer` stores
     32    A :class:`CertificatesContainer` stores
    3333    :class:`waeup.sirp.university.Certificate` instances.
    3434
     
    4242    provide a unique `code`. See :meth:`addCertificate` for details.
    4343
    44     Each :class:`CertificateContainer` provides
    45     :class:`ICertificateContainer`.
     44    Each :class:`CertificatesContainer` provides
     45    :class:`ICertificatesContainer`.
    4646    """
    47     grok.implements(ICertificateContainer)
     47    grok.implements(ICertificatesContainer)
    4848    grok.require('waeup.manageUniversity')
    4949
     
    6767        """
    6868        if not ICertificate.providedBy(certificate):
    69             raise TypeError('CertificateContainers contain only '
     69            raise TypeError('CertificatesContainers contain only '
    7070                            'ICertificate instances')
    7171
     
    8686            # No catalog, then this addition won't do harm to anything.
    8787            pass
    88         super(CertificateContainer, self).__setitem__(name, certificate)
     88        super(CertificatesContainer, self).__setitem__(name, certificate)
    8989
    9090    def addCertificate(self, certificate):
     
    117117        del self.__dict__['_BTreeContainer__len']
    118118
    119 class CertificateContainerFactory(grok.GlobalUtility):
     119class CertificatesContainerFactory(grok.GlobalUtility):
    120120    """A factory for certificate containers.
    121121    """
    122122    grok.implements(IFactory)
    123     grok.name(u'waeup.CertificateContainer')
    124     title = u"Create a new certificate container.",
    125     description = u"This factory instantiates new certificate containers."
     123    grok.name(u'waeup.CertificatesContainer')
     124    title = u"Create a new container for certificates.",
     125    description = u"This factory instantiates new containers for certificates."
    126126
    127127    def __call__(self, *args, **kw):
    128         return CertificateContainer(*args, **kw)
     128        return CertificatesContainer(*args, **kw)
    129129
    130130    def getInterfaces(self):
    131         return implementedBy(CertificateContainer)
     131        return implementedBy(CertificatesContainer)
  • main/waeup.sirp/trunk/src/waeup/sirp/university/certificatescontainer.txt

    r7331 r7333  
    1 :mod:`waeup.sirp.university.certificatecontainer` -- Certificate containers
    2 ***************************************************************************
     1:mod:`waeup.sirp.university.certificatescontainer` -- Certificate containers
     2****************************************************************************
    33
    4 .. module:: waeup.sirp.university.certificatecontainer
     4.. module:: waeup.sirp.university.certificatescontainer
    55
    66Containers for certificates.
     
    1313=======================================
    1414
    15 :class:`CertificateContainer`
    16 -----------------------------
     15:class:`CertificatesContainer`
     16------------------------------
    1717
    18 .. class:: CertificateContainer()
     18.. class:: CertificatesContainer()
    1919
    2020   Create a certificate container instance.
    2121
    22    .. attribute:: grok.implements(ICertificateContainer)
     22   .. attribute:: grok.implements(ICertificatesContainer)
    2323
    2424   .. attribute:: grok.require('waeup.manageUniversity')
    2525
    26    :class:`CertificateContainer` instances are instances of
     26   :class:`CertificatesContainer` instances are instances of
    2727   :class:`grok.Container` that hold and manage instances of
    2828   :class:`waeup.sirp.university.certificate.Certificate`.
    2929
    30      >>> from waeup.sirp.university.certificatecontainer import CertificateContainer
    31      >>> mycontainer = CertificateContainer()
     30     >>> from waeup.sirp.university.certificatescontainer import CertificatesContainer
     31     >>> mycontainer = CertificatesContainer()
    3232     >>> mycontainer
    33      <waeup.sirp.university.certificatecontainer.CertificateContainer object at 0x...>
     33     <waeup.sirp.university.certificatescontainer.CertificatesContainer object at 0x...>
    3434
    35    Certificate containers provide `ICertificateContainer`:
     35   Certificate containers provide `ICertificatesContainer`:
    3636
    37      >>> from waeup.sirp.university.interfaces import ICertificateContainer
    38      >>> ICertificateContainer.providedBy(mycontainer)
     37     >>> from waeup.sirp.university.interfaces import ICertificatesContainer
     38     >>> ICertificatesContainer.providedBy(mycontainer)
    3939     True
    4040
    4141   We can be sure, that the full interface is supported by the
    42    CertificateContainer class:
     42   CertificatesContainer class:
    4343
    4444     >>> from zope.interface.verify import verifyClass
    45      >>> verifyClass(ICertificateContainer, CertificateContainer)
     45     >>> verifyClass(ICertificatesContainer, CertificatesContainer)
    4646     True
    4747
    48    As normal ``grok.Container``, :class:`CertificateContainer` instances
     48   As normal ``grok.Container``, :class:`CertificatesContainer` instances
    4949   can be used like dicts:
    5050
     
    5959      :class:`waeup.sirp.university.certificate.Certificate`:
    6060
    61         >>> from waeup.sirp.university.certificatecontainer import (
    62         ...   CertificateContainer)
    63         >>> mycontainer = CertificateContainer()
     61        >>> from waeup.sirp.university.certificatescontainer import (
     62        ...   CertificatesContainer)
     63        >>> mycontainer = CertificatesContainer()
    6464        >>> mycontainer.addCertificate('blah')
    6565        Traceback (most recent call last):
    6666        ...
    67         TypeError: CertificateContainers contain only ICertificate instances
     67        TypeError: CertificatesContainers contain only ICertificate instances
    6868
    6969      The key of added items is the ``code`` attribute:
     
    8989=========
    9090
    91 :class:`CertificateContainerFactory`
    92 ------------------------------------
     91:class:`CertificatesContainerFactory`
     92-------------------------------------
    9393
    94 .. class:: CertificateContainerFactory()
     94.. class:: CertificatesContainerFactory()
    9595
    96    .. attribute:: grok.name(u'waeup.CertificateContainer')
     96   .. attribute:: grok.name(u'waeup.CertificatesContainer')
    9797
    9898   .. attribute:: grok.implements(IFactory)
    9999
    100    A named utility to deliver new instances of :class:`CertificateContainer`
     100   A named utility to deliver new instances of :class:`CertificatesContainer`
    101101   without the need to import the implementation before:
    102102
    103103     >>> from zope.component import createObject
    104      >>> mycertificatecontainer = createObject(u'waeup.CertificateContainer')
    105      >>> mycertificatecontainer
    106      <waeup.sirp.university.certificatecontainer.CertificateContainer object at 0x...>
     104     >>> mycertificatescontainer = createObject(u'waeup.CertificatesContainer')
     105     >>> mycertificatescontainer
     106     <waeup.sirp.university.certificatescontainer.CertificatesContainer object at 0x...>
    107107
    108108   The factory complies with the specifications from the
     
    111111     >>> from zope.interface.verify import verifyClass
    112112     >>> from zope.component.interfaces import IFactory
    113      >>> from waeup.sirp.university.certificatecontainer import (
    114      ...   CertificateContainerFactory)
    115      >>> verifyClass(IFactory, CertificateContainerFactory)
     113     >>> from waeup.sirp.university.certificatescontainer import (
     114     ...   CertificatesContainerFactory)
     115     >>> verifyClass(IFactory, CertificatesContainerFactory)
    116116     True
    117117
     
    119119   object from the factory:
    120120
    121      >>> certificatecontainer_factory = CertificateContainerFactory()
    122      >>> certificatecontainer_factory.getInterfaces()
    123      <implementedBy waeup.sirp.university.certificatecontainer.CertificateContainer>
     121     >>> certificatescontainer_factory = CertificatesContainerFactory()
     122     >>> certificatescontainer_factory.getInterfaces()
     123     <implementedBy waeup.sirp.university.certificatescontainer.CertificatesContainer>
    124124
    125125
     
    130130-------------------------------
    131131
    132 We can easily create `CertificateContainers`:
     132We can easily create `CertificatesContainers`:
    133133
    134     >>> from waeup.sirp.university.certificatecontainer import CertificateContainer
    135     >>> mycontainer = CertificateContainer()
     134    >>> from waeup.sirp.university.certificatescontainer import CertificatesContainer
     135    >>> mycontainer = CertificatesContainer()
    136136
    137137
    138138Another way to get a certificate container -- without importing the
    139139class -- is via factories. We registered a factory for certificate
    140 containers under the name ``waeup.CertificateContainer``. Now we can
     140containers under the name ``waeup.CertificatesContainer``. Now we can
    141141ask for an object by calling the appropriate factory:
    142142
    143143    >>> from zope.component import createObject
    144     >>> createObject(u'waeup.CertificateContainer')
    145     <waeup.sirp.university.certificatecontainer.CertificateContainer object at 0x...>
     144    >>> createObject(u'waeup.CertificatesContainer')
     145    <waeup.sirp.university.certificatescontainer.CertificatesContainer object at 0x...>
    146146
    147 This way we get a thing that implements ICertificateContainer without
     147This way we get a thing that implements ICertificatesContainer without
    148148imports or similar.
    149149
  • main/waeup.sirp/trunk/src/waeup/sirp/university/course.py

    r7207 r7333  
    6363def handle_course_removed(course, event):
    6464    """If a course is deleted, we make sure that also referrers in a
    65        certificatecontainer are removed.
     65       certificatescontainer are removed.
    6666    """
    6767    code = course.code
  • main/waeup.sirp/trunk/src/waeup/sirp/university/coursescontainer.py

    r7331 r7333  
    2424from zope.component import queryUtility
    2525from waeup.sirp.interfaces import DuplicationError
    26 from waeup.sirp.university.interfaces import ICourseContainer, ICourse
     26from waeup.sirp.university.interfaces import ICoursesContainer, ICourse
    2727
    28 class CourseContainer(grok.Container):
     28class CoursesContainer(grok.Container):
    2929    """See interfaces for description.
    3030    """
    31     grok.implements(ICourseContainer)
     31    grok.implements(ICoursesContainer)
    3232    grok.require('waeup.manageUniversity')
    3333
    3434    def __setitem__(self, name, course):
    35         """See corresponding docstring in certificatecontainer.py.
     35        """See corresponding docstring in certificatescontainer.py.
    3636        """
    3737        if not ICourse.providedBy(course):
    38             raise TypeError('CourseContainers contain only '
     38            raise TypeError('CoursesContainers contain only '
    3939                            'ICourse instances')
    4040
     
    5555            # No catalog, then this addition won't do harm to anything.
    5656            pass
    57         super(CourseContainer, self).__setitem__(name, course)
     57        super(CoursesContainer, self).__setitem__(name, course)
    5858
    5959    def addCourse(self, course):
    60         """See corresponding docstring in certificatecontainer.py.
     60        """See corresponding docstring in certificatescontainer.py.
    6161        """
    6262        self[getattr(course, 'code', None)] = course
    6363
    6464    def clear(self):
    65         """See corresponding docstring and comments in certificatecontainer.py.
     65        """See corresponding docstring and comments in certificatescontainer.py.
    6666        """
    6767        self._SampleContainer__data.clear()
    6868        del self.__dict__['_BTreeContainer__len']
    6969
    70 class CourseContainerFactory(grok.GlobalUtility):
     70class CoursesContainerFactory(grok.GlobalUtility):
    7171    """A factory for course containers.
    7272    """
    7373    grok.implements(IFactory)
    74     grok.name(u'waeup.CourseContainer')
    75     title = u"Create a new course container.",
    76     description = u"This factory instantiates new course containers."
     74    grok.name(u'waeup.CoursesContainer')
     75    title = u"Create a new container for courses.",
     76    description = u"This factory instantiates new containers for courses."
    7777
    7878    def __call__(self, *args, **kw):
    79         return CourseContainer(*args, **kw)
     79        return CoursesContainer(*args, **kw)
    8080
    8181    def getInterfaces(self):
    82         return implementedBy(CourseContainer)
     82        return implementedBy(CoursesContainer)
  • main/waeup.sirp/trunk/src/waeup/sirp/university/coursescontainer.txt

    r7331 r7333  
    1 :mod:`waeup.sirp.university.coursecontainer` -- Course containers
    2 *****************************************************************
     1:mod:`waeup.sirp.university.coursescontainer` -- Course containers
     2******************************************************************
    33
    4 .. module:: waeup.sirp.university.coursecontainer
     4.. module:: waeup.sirp.university.coursescontainer
    55
    66Containers for courses.
     
    1313=======================================
    1414
    15 :class:`CourseContainer`
    16 ------------------------
     15:class:`CoursesContainer`
     16-------------------------
    1717
    18 .. class:: CourseContainer()
     18.. class:: CoursesContainer()
    1919
    2020   Create a course container instance.
    2121
    22    .. attribute:: grok.implements(ICourseContainer)
     22   .. attribute:: grok.implements(ICoursesContainer)
    2323
    2424   .. attribute:: grok.require('waeup.manageUniversity')
    2525
    26    :class:`CourseContainer` instances are instances of
     26   :class:`CoursesContainer` instances are instances of
    2727   :class:`grok.Container` that hold and manage instances of
    2828   :class:`waeup.sirp.university.course.Course`.
    2929
    30      >>> from waeup.sirp.university.coursecontainer import CourseContainer
    31      >>> mycontainer = CourseContainer()
     30     >>> from waeup.sirp.university.coursescontainer import CoursesContainer
     31     >>> mycontainer = CoursesContainer()
    3232     >>> mycontainer
    33      <waeup.sirp.university.coursecontainer.CourseContainer object at 0x...>
     33     <waeup.sirp.university.coursescontainer.CoursesContainer object at 0x...>
    3434
    35    Course containers provide `ICourseContainer`:
     35   Course containers provide `ICoursesContainer`:
    3636
    37      >>> from waeup.sirp.university.interfaces import ICourseContainer
    38      >>> ICourseContainer.providedBy(mycontainer)
     37     >>> from waeup.sirp.university.interfaces import ICoursesContainer
     38     >>> ICoursesContainer.providedBy(mycontainer)
    3939     True
    4040
    4141   We can be sure, that the full interface is supported by the
    42    CourseContainer class:
     42   CoursesContainer class:
    4343
    4444     >>> from zope.interface.verify import verifyClass
    45      >>> verifyClass(ICourseContainer, CourseContainer)
     45     >>> verifyClass(ICoursesContainer, CoursesContainer)
    4646     True
    4747
    48    As normal ``grok.Container``, :class:`CourseContainer` instances
     48   As normal ``grok.Container``, :class:`CoursesContainer` instances
    4949   can be used like dicts:
    5050
     
    5959      :class:`waeup.sirp.university.course.Course`:
    6060
    61         >>> from waeup.sirp.university.coursecontainer import CourseContainer
    62         >>> mycontainer = CourseContainer()
     61        >>> from waeup.sirp.university.coursescontainer import CoursesContainer
     62        >>> mycontainer = CoursesContainer()
    6363        >>> mycontainer.addCourse('blah')
    6464        Traceback (most recent call last):
    6565        ...
    66         TypeError: CourseContainers contain only ICourse instances
     66        TypeError: CoursesContainers contain only ICourse instances
    6767
    6868      The key of added items is the ``code`` attribute:
     
    8888=========
    8989
    90 :class:`CourseContainerFactory`
    91 -------------------------------
     90:class:`CoursesContainerFactory`
     91--------------------------------
    9292
    93 .. class:: CourseContainerFactory()
     93.. class:: CoursesContainerFactory()
    9494
    95    .. attribute:: grok.name(u'waeup.CourseContainer')
     95   .. attribute:: grok.name(u'waeup.CoursesContainer')
    9696
    9797   .. attribute:: grok.implements(IFactory)
    9898
    99    A named utility to deliver new instances of :class:`CourseContainer`
     99   A named utility to deliver new instances of :class:`CoursesContainer`
    100100   without the need to import the implementation before:
    101101
    102102     >>> from zope.component import createObject
    103      >>> mycoursecontainer = createObject(u'waeup.CourseContainer')
    104      >>> mycoursecontainer
    105      <waeup.sirp.university.coursecontainer.CourseContainer object at 0x...>
     103     >>> mycoursescontainer = createObject(u'waeup.CoursesContainer')
     104     >>> mycoursescontainer
     105     <waeup.sirp.university.coursescontainer.CoursesContainer object at 0x...>
    106106
    107107   The factory complies with the specifications from the
     
    110110     >>> from zope.interface.verify import verifyClass
    111111     >>> from zope.component.interfaces import IFactory
    112      >>> from waeup.sirp.university.coursecontainer import CourseContainerFactory
    113      >>> verifyClass(IFactory, CourseContainerFactory)
     112     >>> from waeup.sirp.university.coursescontainer import CoursesContainerFactory
     113     >>> verifyClass(IFactory, CoursesContainerFactory)
    114114     True
    115115
     
    117117   object from the factory:
    118118
    119      >>> coursecontainer_factory = CourseContainerFactory()
    120      >>> coursecontainer_factory.getInterfaces()
    121      <implementedBy waeup.sirp.university.coursecontainer.CourseContainer>
     119     >>> coursescontainer_factory = CoursesContainerFactory()
     120     >>> coursescontainer_factory.getInterfaces()
     121     <implementedBy waeup.sirp.university.coursescontainer.CoursesContainer>
    122122
    123123
     
    128128--------------------------
    129129
    130 We can easily create `CourseContainers`:
     130We can easily create `CoursesContainers`:
    131131
    132     >>> from waeup.sirp.university.coursecontainer import CourseContainer
    133     >>> mycontainer = CourseContainer()
     132    >>> from waeup.sirp.university.coursescontainer import CoursesContainer
     133    >>> mycontainer = CoursesContainer()
    134134
    135135
    136136Another way to get a course container -- without importing the class
    137137-- is via factories. We registered a factory for course containers
    138 under the name ``waeup.CourseContainer``. Now we can ask for an object
     138under the name ``waeup.CoursesContainer``. Now we can ask for an object
    139139by calling the appropriate factory:
    140140
    141141    >>> from zope.component import createObject
    142     >>> createObject(u'waeup.CourseContainer')
    143     <waeup.sirp.university.coursecontainer.CourseContainer object at 0x...>
     142    >>> createObject(u'waeup.CoursesContainer')
     143    <waeup.sirp.university.coursescontainer.CoursesContainer object at 0x...>
    144144
    145 This way we get a thing that implements ICourseContainer without
     145This way we get a thing that implements ICoursesContainer without
    146146imports or similar.
    147147
  • main/waeup.sirp/trunk/src/waeup/sirp/university/department.py

    r7195 r7333  
    4646        self.title_prefix = title_prefix
    4747        self.code = code
    48         self.courses = createObject(u'waeup.CourseContainer')
     48        self.courses = createObject(u'waeup.CoursesContainer')
    4949        self.courses.__parent__ = self
    5050        self.courses.__name__ = 'courses'
    51         self.certificates = createObject(u'waeup.CertificateContainer')
     51        self.certificates = createObject(u'waeup.CertificatesContainer')
    5252        self.certificates.__parent__ = self
    5353        self.certificates.__name__ = 'certificates'
  • main/waeup.sirp/trunk/src/waeup/sirp/university/department.txt

    r7321 r7333  
    8181   .. attribute:: courses
    8282
    83       (ICourseContainer instance) A container for courses.
     83      (ICoursesContainer instance) A container for courses.
    8484
    8585      Each department has a courses container:
    8686
    8787        >>> mydept.courses
    88         <waeup.sirp.university.coursecontainer.CourseContainer object at 0x...>
     88        <waeup.sirp.university.coursescontainer.CoursesContainer object at 0x...>
    8989
    9090
    9191   .. attribute:: certificates
    9292
    93       (ICertificateContainer instance) A container for certificates.
     93      (ICertificatesContainer instance) A container for certificates.
    9494
    9595      Each department has a certificate container, that holds the
     
    9797
    9898        >>> mydept.certificates
    99         <waeup.sirp...certificatecontainer.CertificateContainer object at 0x...>
     99        <waeup.sirp...certificatescontainer.CertificatesContainer object at 0x...>
    100100
    101101Utilities
  • main/waeup.sirp/trunk/src/waeup/sirp/university/facultiescontainer.py

    r7331 r7333  
    2020from zope.interface import implementedBy
    2121from waeup.sirp.interfaces import ISIRPPluggable
    22 from waeup.sirp.university.interfaces import IFacultyContainer, IFaculty
     22from waeup.sirp.university.interfaces import IFacultiesContainer, IFaculty
    2323
    24 class FacultyContainer(grok.Container):
     24class FacultiesContainer(grok.Container):
    2525    """See interfaces for description.
    2626    """
    27     grok.implements(IFacultyContainer)
     27    grok.implements(IFacultiesContainer)
    2828    grok.require('waeup.manageUniversity')
    2929
    3030    def addFaculty(self, faculty):
    3131        if not IFaculty.providedBy(faculty):
    32             raise TypeError('FacultyContainers contain only IFaculty instances')
     32            raise TypeError('FacultiesContainers contain only IFaculty instances')
    3333        self[faculty.code] = faculty
    3434        return
    3535
    36 class FacultyContainerFactory(grok.GlobalUtility):
     36class FacultiesContainerFactory(grok.GlobalUtility):
    3737    """A factory for faculty containers.
    3838    """
    3939    grok.implements(IFactory)
    40     grok.name(u'waeup.FacultyContainer')
    41     title = u"Create a new faculty container.",
    42     description = u"This factory instantiates new faculty containers."
     40    grok.name(u'waeup.FacultiesContainer')
     41    title = u"Create a new facultiescontainer.",
     42    description = u"This factory instantiates new containers for faculties."
    4343
    4444    def __call__(self, *args, **kw):
    45         return FacultyContainer(*args, **kw)
     45        return FacultiesContainer(*args, **kw)
    4646
    4747    def getInterfaces(self):
    48         return implementedBy(FacultyContainer)
     48        return implementedBy(FacultiesContainer)
    4949
    5050class AcademicsPlugin(grok.GlobalUtility):
    51     """A plugin that creates a faculty container inside a university.
     51    """A plugin that creates container for faculties inside a university.
    5252    """
    5353    grok.implements(ISIRPPluggable)
     
    5656    def setup(self, site, name, logger):
    5757        if 'faculties' in site.keys():
    58             logger.warn('Could not create faculty container in SIRP.')
     58            logger.warn('Could not create container for faculties in SIRP.')
    5959            return
    60         site['faculties'] = FacultyContainer()
    61         logger.info('Created faculty container for University')
     60        site['faculties'] = FacultiesContainer()
     61        logger.info('Container for faculties created')
    6262        return
    6363
  • main/waeup.sirp/trunk/src/waeup/sirp/university/facultiescontainer.txt

    r7331 r7333  
    1 :mod:`waeup.sirp.university.facultycontainer` -- Faculty Containers
    2 *******************************************************************
     1:mod:`waeup.sirp.university.facultiescontainer` -- Faculty Containers
     2*********************************************************************
    33
    4 .. module:: waeup.sirp.university.facultycontainer
     4.. module:: waeup.sirp.university.facultiescontainer
    55
    66Components that represent faculty containers.
     
    1313=======================================
    1414
    15 :class:`FacultyContainer`
    16 -------------------------
     15:class:`FacultiesContainer`
     16---------------------------
    1717
    18 .. class:: FacultyContainer()
     18.. class:: FacultiesContainer()
    1919
    2020   Create a faculty container:
    2121
    22      >>> from waeup.sirp.university.facultycontainer import FacultyContainer
    23      >>> mycontainer = FacultyContainer()
     22     >>> from waeup.sirp.university.facultiescontainer import FacultiesContainer
     23     >>> mycontainer = FacultiesContainer()
    2424     >>> mycontainer
    25      <waeup.sirp.university.facultycontainer.FacultyContainer object at 0x...>
     25     <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
    2626
    27    Another way to create :class:`FacultyContainer` instances is by asking
    28    for a factory called ``waeup.FacultyContainer``. This way we can create a
     27   Another way to create :class:`FacultiesContainer` instances is by asking
     28   for a factory called ``waeup.FacultiesContainer``. This way we can create a
    2929   faculty without importing a class:
    3030
    3131     >>> from zope.component import createObject
    32      >>> mycontainer = createObject(u'waeup.FacultyContainer')
     32     >>> mycontainer = createObject(u'waeup.FacultiesContainer')
    3333     >>> mycontainer
    34      <waeup.sirp.university.facultycontainer.FacultyContainer object at 0x...>
     34     <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
    3535
    36    :class:`FacultyContainer` instances have the attributes required by the
    37    `IFacultyContainer` interface:
     36   :class:`FacultiesContainer` instances have the attributes required by the
     37   `IFacultiesContainer` interface:
    3838
    39      >>> from waeup.sirp.university.interfaces import IFacultyContainer
    40      >>> IFacultyContainer.providedBy(mycontainer)
     39     >>> from waeup.sirp.university.interfaces import IFacultiesContainer
     40     >>> IFacultiesContainer.providedBy(mycontainer)
    4141     True
    4242
    4343     >>> from zope.interface.verify import verifyObject
    44      >>> verifyObject(IFacultyContainer, mycontainer)
     44     >>> verifyObject(IFacultiesContainer, mycontainer)
    4545     True
    4646
     
    5353        Traceback (most recent call last):
    5454        ...
    55         TypeError: FacultyContainers contain only IFaculty instances
     55        TypeError: FacultiesContainers contain only IFaculty instances
    5656
    5757        >>> list(mycontainer.values())
     
    8181   This plugin component tells under which name (``faculties``) an
    8282   instance of academics stuff should be created in plain SIRP
    83    instances. It also tells the factory name for FacultyContainer
     83   instances. It also tells the factory name for FacultiesContainer
    8484   instances, which serve as root object for academics stuff in SIRP apps.
    8585
    8686
    87 :class:`FacultyContainerFactory`
    88 --------------------------------
     87:class:`FacultiesContainerFactory`
     88----------------------------------
    8989
    90 .. class:: FacultyContainerFactory()
     90.. class:: FacultiesContainerFactory()
    9191
    92    .. attribute:: grok.name(u'waeup.FacultyContainer')
     92   .. attribute:: grok.name(u'waeup.FacultiesContainer')
    9393
    9494   .. attribute:: grok.implements(IFactoryContainer)
    9595
    96    A named utility to deliver new instances of :class:`FacultyContainer`
     96   A named utility to deliver new instances of :class:`FacultiesContainer`
    9797   without the need to import the implementation before:
    9898
    9999     >>> from zope.component import createObject
    100      >>> mycontainer = createObject(u'waeup.FacultyContainer')
     100     >>> mycontainer = createObject(u'waeup.FacultiesContainer')
    101101     >>> mycontainer
    102      <waeup.sirp.university.facultycontainer.FacultyContainer object at 0x...>
     102     <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
    103103
    104104   The factory complies with the specifications from the
     
    107107     >>> from zope.interface.verify import verifyClass
    108108     >>> from zope.component.interfaces import IFactory
    109      >>> from waeup.sirp.university.facultycontainer import (
    110      ...   FacultyContainerFactory)
    111      >>> verifyClass(IFactory, FacultyContainerFactory)
     109     >>> from waeup.sirp.university.facultiescontainer import (
     110     ...   FacultiesContainerFactory)
     111     >>> verifyClass(IFactory, FacultiesContainerFactory)
    112112     True
    113113
     
    115115   object from the factory:
    116116
    117      >>> fac_container_factory = FacultyContainerFactory()
     117     >>> fac_container_factory = FacultiesContainerFactory()
    118118     >>> fac_container_factory.getInterfaces()
    119      <implementedBy waeup.sirp.university.facultycontainer.FacultyContainer>
     119     <implementedBy waeup.sirp.university.facultiescontainer.FacultiesContainer>
    120120
    121121Examples
    122122========
    123123
    124 We can easily create `FacultyContainers`:
     124We can easily create `FacultiesContainers`:
    125125
    126     >>> from waeup.sirp.university.facultycontainer import FacultyContainer
    127     >>> mycontainer = FacultyContainer()
     126    >>> from waeup.sirp.university.facultiescontainer import FacultiesContainer
     127    >>> mycontainer = FacultiesContainer()
    128128
    129 Faculty containers provide `IFacultyContainer`:
     129Faculty containers provide `IFacultiesContainer`:
    130130
    131     >>> from waeup.sirp.university.interfaces import IFacultyContainer
    132     >>> IFacultyContainer.providedBy(mycontainer)
     131    >>> from waeup.sirp.university.interfaces import IFacultiesContainer
     132    >>> IFacultiesContainer.providedBy(mycontainer)
    133133    True
    134134
    135135Another way to get a faculty container -- without importing the class
    136136-- is via factories. We registered a factory for faculty containers
    137 under the name ``waeup.facultycontainer``:
     137under the name ``waeup.facultiescontainer``:
    138138
    139139    >>> from zope.component import createObject
    140     >>> createObject(u'waeup.FacultyContainer')
    141     <waeup.sirp.university.facultycontainer.FacultyContainer object at 0x...>
     140    >>> createObject(u'waeup.FacultiesContainer')
     141    <waeup.sirp.university.facultiescontainer.FacultiesContainer object at 0x...>
    142142
    143 This way we get a thing that implements IFacultyContainer without
     143This way we get a thing that implements IFacultiesContainer without
    144144imports or similar.
    145145
    146146We can be sure, that the full interface is supported by the
    147 FacultyContainer class::
     147FacultiesContainer class::
    148148
    149149    >>> from zope.interface.verify import verifyClass
    150     >>> verifyClass(IFacultyContainer, FacultyContainer)
     150    >>> verifyClass(IFacultiesContainer, FacultiesContainer)
    151151    True
    152152
     
    161161    Traceback (most recent call last):
    162162    ...
    163     TypeError: FacultyContainers contain only IFaculty instances
     163    TypeError: FacultiesContainers contain only IFaculty instances
    164164
    165165Okay, so we have to get a faculty first::
  • main/waeup.sirp/trunk/src/waeup/sirp/university/interfaces.py

    r7321 r7333  
    7373IFacultyAdd['code'].order =  IFaculty['code'].order
    7474
    75 class IFacultyContainer(ISIRPContainer):
     75class IFacultiesContainer(ISIRPContainer):
    7676    """A container for faculties.
    7777    """
     
    124124IDepartmentAdd['code'].order =  IDepartment['code'].order
    125125
    126 class ICourseContainer(ISIRPContainer):
     126class ICoursesContainer(ISIRPContainer):
    127127    """A container for faculties.
    128128    """
     
    248248ICertificateAdd['code'].order =  ICertificate['code'].order
    249249
    250 class ICertificateContainer(ISIRPContainer):
     250class ICertificatesContainer(ISIRPContainer):
    251251    """A container for certificates.
    252252    """
  • main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_certificatescontainer.py

    r7331 r7333  
    3030    FunctionalLayer, doctestsuite_for_module, FunctionalTestCase)
    3131from waeup.sirp.university.certificate import Certificate
    32 from waeup.sirp.university.certificatecontainer import CertificateContainer
    33 from waeup.sirp.university.interfaces import ICertificateContainer
     32from waeup.sirp.university.certificatescontainer import CertificatesContainer
     33from waeup.sirp.university.interfaces import ICertificatesContainer
    3434
    3535
    36 class CertificateContainerTests(FunctionalTestCase):
     36class CertificatesContainerTests(FunctionalTestCase):
    3737
    3838    layer = FunctionalLayer
    3939
    4040    def setUp(self):
    41         super(CertificateContainerTests, self).setUp()
     41        super(CertificatesContainerTests, self).setUp()
    4242
    4343        # Setup a sample site for each test
     
    5252
    5353    def tearDown(self):
    54         super(CertificateContainerTests, self).tearDown()
     54        super(CertificatesContainerTests, self).tearDown()
    5555        clearSite()
    5656        shutil.rmtree(self.dc_root)
     
    5858    def test_create(self):
    5959        # we can create instances
    60         container = CertificateContainer()
    61         result = isinstance(container, CertificateContainer)
     60        container = CertificatesContainer()
     61        result = isinstance(container, CertificatesContainer)
    6262        assert result is True
    6363
    64     def test_provides_icertificatecontainer(self):
     64    def test_provides_icertificatescontainer(self):
    6565        # instances tell they provide their main interface
    66         container = CertificateContainer()
    67         result = ICertificateContainer.providedBy(container)
     66        container = CertificatesContainer()
     67        result = ICertificatesContainer.providedBy(container)
    6868        assert result is True
    6969
    7070    def test_interfaces(self):
    7171        # class and instances comply with their main interface
    72         container = CertificateContainer()
    73         self.assertTrue(verifyClass(ICertificateContainer, CertificateContainer))
    74         self.assertTrue(verifyObject(ICertificateContainer, container))
     72        container = CertificatesContainer()
     73        self.assertTrue(verifyClass(ICertificatesContainer, CertificatesContainer))
     74        self.assertTrue(verifyObject(ICertificatesContainer, container))
    7575
    7676    def test_add_certificate_non_icertificate(self):
    7777        # we cannot add certificates that do not implement ICertificate.
    78         container = CertificateContainer()
     78        container = CertificatesContainer()
    7979        self.assertRaises(
    8080            TypeError, container.addCertificate, 'some_string')
     
    8282    def test_add_certificate_no_duplicate_entry(self):
    8383        # we cannot add certificates that are registered already.
    84         container = CertificateContainer()
     84        container = CertificatesContainer()
    8585        # We must place this container in the ZODB to make catalogs work.
    8686        self.app['certs'] = container
     
    9494    def test_setitem_duplicate_entry(self):
    9595        # we cannot add certificates whose code exists already in catalog
    96         container1 = CertificateContainer()
    97         container2 = CertificateContainer()
     96        container1 = CertificatesContainer()
     97        container2 = CertificatesContainer()
    9898        self.app['certs1'] = container1 # enable catalogs
    9999        self.app['certs2'] = container2
     
    108108    def test_setitem_name_unequal_code(self):
    109109        # we cannot add certificates whose code != key
    110         container = CertificateContainer()
     110        container = CertificatesContainer()
    111111        self.app['certs'] = container # enable catalogs
    112112        cert1 = Certificate(code="CERT1")
     
    118118    def test_clear(self):
    119119        # clear() really empties the container.
    120         container = CertificateContainer()
     120        container = CertificatesContainer()
    121121        self.app['certs'] = container # enable catalogs
    122122        cert1 = Certificate(code="CERT1")
     
    130130def test_suite():
    131131    suite = unittest.TestSuite((
    132         unittest.makeSuite(CertificateContainerTests),
     132        unittest.makeSuite(CertificatesContainerTests),
    133133        doctestsuite_for_module(
    134                 'waeup.sirp.university.certificatecontainer'),
     134                'waeup.sirp.university.certificatescontainer'),
    135135        ))
    136136    return suite
  • main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_coursescontainer.py

    r7331 r7333  
    2121import unittest
    2222from zope.interface.verify import verifyClass, verifyObject
    23 from waeup.sirp.university.interfaces import ICourseContainer
    24 from waeup.sirp.university import CourseContainer, Course
     23from waeup.sirp.university.interfaces import ICoursesContainer
     24from waeup.sirp.university import CoursesContainer, Course
    2525
    26 class CourseContainerTests(unittest.TestCase):
     26class CoursesContainerTests(unittest.TestCase):
    2727
    2828    def test_ifaces(self):
    29         container = CourseContainer()
    30         self.assertTrue(verifyClass(ICourseContainer, CourseContainer))
    31         self.assertTrue(verifyObject(ICourseContainer, container))
     29        container = CoursesContainer()
     30        self.assertTrue(verifyClass(ICoursesContainer, CoursesContainer))
     31        self.assertTrue(verifyObject(ICoursesContainer, container))
    3232
    3333    def test_setitem_name_ne_code(self):
    3434        # If we add a course under a wrong name that will give an error
    35         container = CourseContainer()
     35        container = CoursesContainer()
    3636        course = Course(code='MYCOURSE')
    3737        self.assertRaises(
  • main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_facultiescontainer.py

    r7331 r7333  
    1717##
    1818
    19 # Tests for FacultyContainer.
     19# Tests for FacultiesContainer.
    2020import logging
    2121import unittest
     
    2323from zope.interface.verify import verifyObject, verifyClass
    2424from waeup.sirp.testing import FunctionalTestCase, FunctionalLayer
    25 from waeup.sirp.university.interfaces import IFacultyContainer
    26 from waeup.sirp.university import FacultyContainer
    27 from waeup.sirp.university.facultycontainer import AcademicsPlugin
     25from waeup.sirp.university.interfaces import IFacultiesContainer
     26from waeup.sirp.university import FacultiesContainer
     27from waeup.sirp.university.facultiescontainer import AcademicsPlugin
    2828
    2929class FakeLogger(object):
     
    5454        return result
    5555
    56 class FacultyContainerTests(unittest.TestCase):
     56class FacultiesContainerTests(unittest.TestCase):
    5757
    5858    def test_ifaces(self):
    59         container = FacultyContainer()
    60         self.assertTrue(verifyClass(IFacultyContainer, FacultyContainer))
    61         self.assertTrue(verifyObject(IFacultyContainer, container))
     59        container = FacultiesContainer()
     60        self.assertTrue(verifyClass(IFacultiesContainer, FacultiesContainer))
     61        self.assertTrue(verifyObject(IFacultiesContainer, container))
    6262
    6363class AcademicsPluginTests(unittest.TestCase):
     
    7676        plugin.setup(site, 'testsite', logger)
    7777        self.assertTrue('faculties' in site.keys())
    78         self.assertTrue(isinstance(site['faculties'], FacultyContainer))
     78        self.assertTrue(isinstance(site['faculties'], FacultiesContainer))
    7979        self.assertEqual(
    8080            self._logger_factory.get_messages(),
    81             'Created faculty container for University\n'
     81            'Container for faculties created\n'
    8282            )
    8383
     
    9090        self.assertEqual(
    9191            self._logger_factory.get_messages(),
    92             'Could not create faculty container in SIRP.\n'
     92            'Could not create container for faculties in SIRP.\n'
    9393            )
    9494
     
    9999        plugin.update(site, 'testsite', logger)
    100100        self.assertTrue('faculties' in site.keys())
    101         self.assertTrue(isinstance(site['faculties'], FacultyContainer))
     101        self.assertTrue(isinstance(site['faculties'], FacultiesContainer))
    102102        self.assertEqual(
    103103            self._logger_factory.get_messages(),
    104             'Created faculty container for University\n'
     104            'Container for faculties created\n'
    105105            )
    106106
  • main/waeup.sirp/trunk/src/waeup/sirp/university/tests/test_university.py

    r7195 r7333  
    2727        names = globals().keys()
    2828        self.assertTrue('Course' in names)
    29         self.assertTrue('CourseContainer' in names)
     29        self.assertTrue('CoursesContainer' in names)
    3030        self.assertTrue('Faculty' in names)
    31         self.assertTrue('FacultyContainer' in names)
     31        self.assertTrue('FacultiesContainer' in names)
    3232
    3333def test_suite():
Note: See TracChangeset for help on using the changeset viewer.