Changeset 4082 for waeup


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

Update tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-rewrite/src/waeup/hostel/hostelcontainer.txt

    r3941 r4082  
    1414    >>> mycontainer = HostelContainer()
    1515
    16 Another way to get a hostel container -- without importing the class
    17 -- is via utilities. HostelContainer instances provide the
    18 IHostelContainer interface::
     16Hostel containers provide ``IHostelContainer``:
    1917
    2018    >>> from waeup.interfaces import IHostelContainer
     
    2220    True
    2321
    24 Also a factory(-utility) is registered, so that we can ask for a
    25 hostel 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 hostel container -- without importing the class
     23-- is via factories. We registered a factory for hostel containers
     24under the name ``waeup.HostelContainer``::
    2725
    2826    >>> import grok
    2927    >>> grok.testing.grok('waeup')
    3028
    31 Now we can ask for an object providing `IHostelContainer`::
     29Now we can ask for an object by calling the appropriate factory:
    3230
    33     >>> from zope.component import getUtility
    34     >>> getUtility(IHostelContainer)
     31    >>> from zope.component import createObject
     32    >>> createObject(u'waeup.HostelContainer')
    3533    <waeup.hostel.hostelcontainer.HostelContainer object at 0x...>
    3634
Note: See TracChangeset for help on using the changeset viewer.