source: products/quintagroup.portlet.collection/trunk/quintagroup/portlet/collection/tests/base.py @ 3556

Last change on this file since 3556 was 3556, checked in by vmaksymiv, 7 years ago

PPP fixes

  • Property svn:eol-style set to native
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
10@onsetup
11def setup_product():
12    """Set up additional products and ZCML required to test this product.
13
14    The @onsetup decorator causes the execution of this body to be deferred
15    until the setup of the Plone site testing layer.
16    """
17
18    # Load the ZCML configuration for this package and its dependencies
19
20    fiveconfigure.debug_mode = True
21    import quintagroup.portlet.collection
22    zcml.load_config('configure.zcml', quintagroup.portlet.collection)
23    fiveconfigure.debug_mode = False
24
25    # We need to tell the testing framework that these products
26    # should be available. This can't happen until after we have loaded
27    # the ZCML.
28
29    ztc.installPackage('quintagroup.portlet.collection')
30
31# The order here is important: We first call the deferred function and then
32# let PloneTestCase install it during Plone site setup
33
34setup_product()
35ptc.setupPloneSite(products=['quintagroup.portlet.collection'])
36
37
38class TestCase(ptc.PloneTestCase):
39    """Base class used for test cases
40    """
41
42
43class FunctionalTestCase(ptc.FunctionalTestCase):
44    """Test case class used for functional (doc-)tests
45    """
Note: See TracBrowser for help on using the repository browser.