Back to index

plone3  3.1.7
Public Member Functions
kss.core.tests.base.KSSCoreLayer Class Reference
Inheritance diagram for kss.core.tests.base.KSSCoreLayer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def setUp
def tearDown

Detailed Description

Definition at line 31 of file base.py.


Member Function Documentation

Reimplemented in kss.core.tests.base.KSSLayer.

Definition at line 33 of file base.py.

00033 
00034     def setUp(cls):
00035         try:
00036             import Products.Five
00037         except ImportError:
00038             # probably zope 3
00039             pass
00040             # XXX TODO fix this?? --- never run yet on Z3
00041             from zope.configuration.xmlconfig import XMLConfig
00042             XMLConfig('tests/configure-unittest.zcml', kss.core)()
00043         else:
00044             from Products.Five.zcml import load_string, load_config
00045             load_config('meta.zcml', package=Products.Five)
00046 
00047             try:
00048                 load_config('traversing.zcml', package=Products.Five)
00049             except IOError:
00050                 # Let's try the Zope 2.9 way (zope.app.traversing is
00051                 # moved in 2.10)
00052                 load_string(dedent('''\
00053                 <configure xmlns="http://namespaces.zope.org/zope"
00054                            xmlns:five="http://namespaces.zope.org/five">
00055                   <include package="zope.app.traversing" />
00056                   <adapter
00057                        for="*"
00058                        factory="Products.Five.traversable.FiveTraversable"
00059                        provides="zope.app.traversing.interfaces.ITraversable"
00060                        />
00061                    <adapter
00062                        for="*"
00063                        factory="zope.app.traversing.adapters.Traverser"
00064                        provides="zope.app.traversing.interfaces.ITraverser"
00065                        />
00066                 </configure>'''))
00067             # Load the permissions config, if it's there
00068             try:
00069                 load_config('permissions.zcml', package=Products.Five)
00070             except IOError:
00071                 # Zope 2.10 / Five 1.3.6 does not have it
00072                 pass
00073             load_config('configure-unittest.zcml', package=kss.core.tests)

Definition at line 75 of file base.py.

00075 
00076     def tearDown(cls):
00077         pass # placelesssetup.tearDown()
00078     


The documentation for this class was generated from the following file: