source: products/quintagroup.portlet.cumulus/trunk/quintagroup/portlet/cumulus/tests/base.py @ 1003

Last change on this file since 1003 was 1003, checked in by koval, 15 years ago

initial import

File size: 1.3 KB
Line 
1from Products.Five import zcml
2from Products.Five import fiveconfigure
3
4from Testing import ZopeTestCase as ztc
5
6from Products.PloneTestCase import PloneTestCase as ptc
7from Products.PloneTestCase.layer import onsetup
8
9@onsetup
10def setup_product():
11    """Set up additional products and ZCML required to test this product.
12
13    The @onsetup decorator causes the execution of this body to be deferred
14    until the setup of the Plone site testing layer.
15    """
16
17    # Load the ZCML configuration for this package and its dependencies
18
19    fiveconfigure.debug_mode = True
20    import quintagroup.portlet.cumulus
21    zcml.load_config('configure.zcml', quintagroup.portlet.cumulus)
22    fiveconfigure.debug_mode = False
23
24    # We need to tell the testing framework that these products
25    # should be available. This can't happen until after we have loaded
26    # the ZCML.
27
28    ztc.installPackage('quintagroup.portlet.cumulus')
29
30# The order here is important: We first call the deferred function and then
31# let PloneTestCase install it during Plone site setup
32
33setup_product()
34ptc.setupPloneSite(products=['quintagroup.portlet.cumulus'])
35
36class TestCase(ptc.PloneTestCase):
37    """Base class used for test cases
38    """
39
40class FunctionalTestCase(ptc.FunctionalTestCase):
41    """Test case class used for functional (doc-)tests
42    """
Note: See TracBrowser for help on using the repository browser.