Changeset 4921 for waeup


Ignore:
Timestamp:
28 Jan 2010, 09:37:05 (15 years ago)
Author:
uli
Message:

Make functional tests work again.

Location:
waeup/branches/ulif-namespace/src/waeup/sirp
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • waeup/branches/ulif-namespace/src/waeup/sirp/authentication.txt

    r4789 r4921  
    1212Before we can check access we have to create an app:
    1313
    14   >>> from waeup.app import University
     14  >>> from waeup.sirp.app import University
    1515  >>> root = getRootFolder()
    1616  >>> u = University()
     
    3636user credentials and some metadata persistently:
    3737
    38   >>> from waeup.authentication import Account
     38  >>> from waeup.sirp.authentication import Account
    3939  >>> alice = Account('alice', 'alicesecret')
    4040  >>> root['app']['users'].addAccount(alice)
  • waeup/branches/ulif-namespace/src/waeup/sirp/browser.txt

    r4905 r4921  
    2525  []
    2626
    27   >>> from waeup.app import University
     27  >>> from waeup.sirp.app import University
    2828  >>> u = University()
    2929  >>> root['myuniversity'] = u
     
    265265Courses are stored in :class:`ICourseContainer` instances with their
    266266code as key. CourseContainers are normally availabe as `course`
    267 attribute of :class:`waeup.university.department.Department`
     267attribute of :class:`waeup.sirp.university.department.Department`
    268268instances.
    269269
     
    413413with their code as key. CertificateContainers are normally availabe as
    414414`certificates` attribute of
    415 :class:`waeup.university.department.Department` instances.
     415:class:`waeup.sirp.university.department.Department` instances.
    416416
    417417To ease the life of users we do not require to browse the
     
    725725  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    726726  ...
    727   <b>Storage path:</b> <span>/.../waeup/files</span>
     727  <b>Storage path:</b> <span>/.../waeup/sirp/files</span>
    728728  ...
    729729
  • waeup/branches/ulif-namespace/src/waeup/sirp/browser/batchprocessing.txt

    r4899 r4921  
    2323Create a site:
    2424
    25     >>> from waeup.app import University
     25    >>> from waeup.sirp.app import University
    2626    >>> getRootFolder()['app'] = University()
    2727
  • waeup/branches/ulif-namespace/src/waeup/sirp/browser/breadcrumbs.txt

    r4789 r4921  
    1313We create a university to check the breadcrumb functionality.
    1414
    15     >>> from waeup.app import University
     15    >>> from waeup.sirp.app import University
    1616    >>> root = getRootFolder()
    1717    >>> root['app'] = University()
     
    2424viewname:
    2525
    26     >>> from waeup.browser.breadcrumbs import getBreadcrumbList
     26    >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbList
    2727    >>> blist1 = getBreadcrumbList(app, 'index')
    2828    >>> blist1
    29     [<waeup.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]
     29    [<waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]
    3030
    3131A slightly more extensive list for the datacenter:
     
    3434    >>> from pprint import pprint
    3535    >>> pprint(blist2)
    36     [<waeup.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>,
    37      <waeup.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>,
    38      <waeup.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>]
     36    [<waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>,
     37     <waeup.sirp.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>,
     38     <waeup.sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>]
    3939
    4040We get a breadcrumb for university, administration area and data
     
    4949
    5050     >>> pprint([(x.context, x.viewname) for x in blist2])
    51      [(<waeup.app.University object at 0x...>, 'index'),
    52       (<waeup.app.University object at 0x...>, 'administration'),
    53       (<waeup.datacenter.DataCenter object at 0x...>, 'index')]
     51     [(<waeup.sirp.app.University object at 0x...>, 'index'),
     52      (<waeup.sirp.app.University object at 0x...>, 'administration'),
     53      (<waeup.sirp.datacenter.DataCenter object at 0x...>, 'index')]
    5454
    5555The administration area breadcrumb might be a surprise, as there is no
     
    9191Now we can get the breadcrumbs for this view:
    9292
    93     >>> from waeup.browser.breadcrumbs import getBreadcrumbListForView
     93    >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbListForView
    9494    >>> blist3 = getBreadcrumbListForView(page)
    9595    >>> [x.title for x in blist3]
     
    111111The returned breadcrumb container supports iteration:
    112112
    113     >>> from waeup.browser.interfaces import IBreadcrumbContainer
     113    >>> from waeup.sirp.browser.interfaces import IBreadcrumbContainer
    114114    >>> mybccontainer = IBreadcrumbContainer(page)
    115115    >>> [x.title for x in mybccontainer]
     
    133133
    134134    >>> from zope.component import getAdapter
    135     >>> from waeup.browser.interfaces import IBreadcrumb
     135    >>> from waeup.sirp.browser.interfaces import IBreadcrumb
    136136    >>> b1 = getAdapter(app, IBreadcrumb, 'index')
    137137    >>> b1
    138     <waeup.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>
     138    <waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>
    139139
    140140Breadcrumb objects provide a title:
     
    158158    >>> b2 = getAdapter(app['datacenter'], IBreadcrumb, 'index')
    159159    >>> b2
    160     <waeup.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>
     160    <waeup.sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>
    161161
    162162    >>> b2.title
     
    170170
    171171    >>> b2.parent
    172     (<waeup.app.University object at 0x...>, 'administration')
     172    (<waeup.sirp.app.University object at 0x...>, 'administration')
    173173
    174174This result denotes a new context object (the University instance we
     
    186186    >>> b3 = getAdapter(context, IBreadcrumb, viewname)
    187187    >>> b3
    188     <waeup...breadcrumbs.AdministrationBreadcrumb object at 0x...>
     188    <waeup.sirp...breadcrumbs.AdministrationBreadcrumb object at 0x...>
    189189
    190190As you can see, we get an AdministrationBreadcrumb, although the
     
    199199    >>> context, viewname = b3.parent
    200200    >>> context, viewname
    201     (<waeup.app.University object at 0x...>, 'index')
     201    (<waeup.sirp.app.University object at 0x...>, 'index')
    202202
    203203We create last breadcrumb:
  • waeup/branches/ulif-namespace/src/waeup/sirp/ftesting.zcml

    r4789 r4921  
    11<configure
    22   xmlns="http://namespaces.zope.org/zope"
    3    i18n_domain="waeup"
    4    package="waeup"
     3   i18n_domain="waeup.sirp"
     4   package="waeup.sirp"
    55   >
    66
    77  <include package="grok" />
    8   <include package="waeup" />
     8  <include package="waeup.sirp" />
    99
    1010  <!-- Typical functional testing security setup -->
  • waeup/branches/ulif-namespace/src/waeup/sirp/university/courserefs.txt

    r4789 r4921  
    1818As correct deletion of references needs support of catalogs (we lookup
    1919catalogs to find references), we need a fully blown ZODB here,
    20 including an instance of :class:`waeup.app.University`, as this is our
     20including an instance of :class:`waeup.sirp.app.University`, as this is our
    2121`ISite` object where the catalogs are stored.
    2222
     
    2525and course certificates:
    2626
    27     >>> from waeup.app import University
     27    >>> from waeup.sirp.app import University
    2828    >>> root = getRootFolder()
    2929    >>> root['app'] = University()
  • waeup/branches/ulif-namespace/src/waeup/sirp/utils/batching.txt

    r4912 r4921  
    1 :mod:`waeup.utils.batching` -- Batch processing
    2 ***********************************************
     1:mod:`waeup.sirp.utils.batching` -- Batch processing
     2****************************************************
    33
    44Batch processing is much more than pure data import.
     
    190190All we need, is a batch processor now.
    191191
    192     >>> from waeup.utils.batching import BatchProcessor
     192    >>> from waeup.sirp.utils.batching import BatchProcessor
    193193    >>> class CaveProcessor(BatchProcessor):
    194194    ...   util_name = 'caveprocessor'
Note: See TracChangeset for help on using the changeset viewer.