source: products/quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/base.py @ 832

Last change on this file since 832 was 832, checked in by chervol, 17 years ago

fixed the polish translation

File size: 1.4 KB
Line 
1from Products.Five import zcml, fiveconfigure
2
3from Testing import ZopeTestCase as ztc
4
5from Products.PloneTestCase import PloneTestCase as ptc
6from Products.PloneTestCase.layer import onsetup
7from Products.CMFCore.utils import getToolByName
8
9from config import *
10#PRODUCT = 'quintagroup.plonecomments'
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.plonecomments
24    zcml.load_config('configure.zcml', quintagroup.plonecomments)
25    zcml.load_config('overrides.zcml', quintagroup.plonecomments)
26    fiveconfigure.debug_mode = False
27
28    # We need to tell the testing framework that these products
29    # should be available. This can't happen until after we have loaded
30    # the ZCML.
31
32    ztc.installPackage(PRODUCT)
33
34# The order here is important: We first call the deferred function and then
35# let PloneTestCase install it during Plone site setup
36
37setup_product()
38ptc.setupPloneSite(products=[PRODUCT])
39
40class TestCase(ptc.PloneTestCase):
41    """Base class used for test cases
42    """
43
44class FunctionalTestCase(ptc.FunctionalTestCase):
45    """Test case class used for functional (doc-)tests
46    """
Note: See TracBrowser for help on using the repository browser.