source: products/quintagroup.portlet.pfg/trunk/quintagroup/portlet/pfg/tests/base.py @ 3635

Last change on this file since 3635 was 3635, checked in by kroman0, 11 years ago

Pep8,pyflakes

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