Changeset 4080 for waeup/branches


Ignore:
Timestamp:
25 Apr 2009, 13:36:30 (16 years ago)
Author:
uli
Message:

Update tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/university/facultycontainer.txt

    r3924 r4080  
    1414    >>> mycontainer = FacultyContainer()
    1515
    16 Another way to get a faculty container -- without importing the class
    17 -- is via utilities. FacultyContainer instances provide the
    18 IFacultyContainer interface::
     16Faculty containers provide `IFacultyContainer`:
    1917
    2018    >>> from waeup.interfaces import IFacultyContainer
     
    2220    True
    2321
    24 Also a factory(-utility) is registered, so that we can ask for a
    25 faculty container without importing one. To check this, we first have
    26 to grok the `waeup` package. This is normally done during startup::
     22Another way to get a faculty container -- without importing the class
     23-- is via factories. We registered a factory for faculty containers
     24under the name ``waeup.facultycontainer``::
    2725
    2826    >>> import grok
    2927    >>> grok.testing.grok('waeup')
    3028
    31 Now we can ask for an object providing `IFacultyContainer`::
     29Now we can ask for an object by calling the appropriate factory:
    3230
    33     >>> from zope.component import getUtility
    34     >>> getUtility(IFacultyContainer)
     31    >>> from zope.component import createObject
     32    >>> createObject(u'waeup.FacultyContainer')
    3533    <waeup.university.facultycontainer.FacultyContainer object at 0x...>
    3634
Note: See TracChangeset for help on using the changeset viewer.