Back to index

plone3  3.1.7
Classes | Functions
plone.portlet.collection.tests.base Namespace Reference

Classes

class  TestCase
class  FunctionalTestCase

Functions

def setup_product

Class Documentation

class plone::portlet::collection::tests::base::FunctionalTestCase
Test case class used for functional (doc-)tests

Definition at line 40 of file base.py.


Function Documentation

Set up additional products and ZCML required to test this product.

The @onsetup decorator causes the execution of this body to be deferred
until the setup of the Plone site testing layer.

Definition at line 10 of file base.py.

00010 
00011 def setup_product():
00012     """Set up additional products and ZCML required to test this product.
00013     
00014     The @onsetup decorator causes the execution of this body to be deferred
00015     until the setup of the Plone site testing layer.
00016     """
00017     
00018     # Load the ZCML configuration for this package and its dependencies
00019     
00020     fiveconfigure.debug_mode = True
00021     import plone.portlet.collection
00022     zcml.load_config('configure.zcml', plone.portlet.collection)
00023     fiveconfigure.debug_mode = False
00024     
00025     # We need to tell the testing framework that these products
00026     # should be available. This can't happen until after we have loaded
00027     # the ZCML.
00028     
00029     ztc.installPackage('plone.portlet.collection')
00030     
00031 # The order here is important: We first call the deferred function and then 
00032 # let PloneTestCase install it during Plone site setup
00033 
00034 setup_product()
00035 ptc.setupPloneSite(products=['plone.portlet.collection'])