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

Last change on this file since 2755 was 2755, checked in by fenix, 9 years ago
  • added tests;
  • fixed style bug (None class was added when no portlet style is selected);
  • removed trailing characters;
  • removed unnecessary pice of code;
  • some javascript optimizations;
  • 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@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.collection
21    zcml.load_config('configure.zcml', quintagroup.portlet.collection)
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.collection')
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.collection'])
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.