1 from Products
.Five
import zcml
2 from Products
.Five
import fiveconfigure
4 from Testing
import ZopeTestCase
as ztc
6 from Products
.PloneTestCase
import PloneTestCase
as ptc
7 from Products
.PloneTestCase
.layer
import onsetup
, PloneSite
8 from Products
.PloneTestCase
.PloneTestCase
import setupPloneSite
10 from plone
.app
.controlpanel
.tests
import ControlPanelTestCase
11 from kss
.core
.tests
.base
import KSSLayer
, KSSViewTestCase
13 from paula
.testing
.testing
import my_import
16 def setup_package(pkg_name
, deps
=[]):
18 The @onsetup decorator causes the execution of this body to be deferred
19 until the setup of the Plone site testing layer.
22 # Load the ZCML configuration for the optilux.policy package.
23 # This includes the other products below as well.
25 fiveconfigure
.debug_mode
= True
27 mod
= my_import(pkg_name
)
28 zcml
.load_config('ftesting.zcml', mod
)
29 fiveconfigure
.debug_mode
= False
31 # We need to tell the testing framework that these products
32 # should be available. This can't happen until after we have loaded
35 ztc
.installPackage(pkg_name
)
39 class PloneTestCase(ptc
.PloneTestCase
):
40 """Base class used for test cases
43 class FunctionalTestCase(ptc
.FunctionalTestCase
):
44 """Test case class used for functional (doc-)tests
47 class PanelTestCase(FunctionalTestCase
, ControlPanelTestCase
):
48 """Test case used for the control panel tests, with some convenience
49 methods from plone.app.controlpanel.
52 class KSSTestCase(FunctionalTestCase
, KSSViewTestCase
):
53 """Test case used for KSS tests
56 class layer(KSSLayer
, PloneSite
):