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
9 from plone
.app
.controlpanel
.tests
import ControlPanelTestCase
10 from kss
.core
.tests
.base
import KSSLayer
, KSSViewTestCase
13 def setup_paula_plonepas():
14 """Set up the additional products required for the Optilux Cinema Content.
16 The @onsetup decorator causes the execution of this body to be deferred
17 until the setup of the Plone site testing layer.
20 # Load the ZCML configuration for the optilux.policy package.
21 # This includes the other products below as well.
23 fiveconfigure
.debug_mode
= True
25 zcml
.load_config('configure.zcml', paula
.plonepas
)
26 fiveconfigure
.debug_mode
= False
28 # We need to tell the testing framework that these products
29 # should be available. This can't happen until after we have loaded
32 ztc
.installPackage('paula.plonepas')
34 # The order here is important: We first call the (deferred) function which
35 # installs the products we need for the Optilux package. Then, we let
36 # PloneTestCase set up this product on installation.
38 setup_paula_plonepas()
39 ptc
.setupPloneSite(products
=['paula.plonepas'])
41 class PaulaTestCase(ptc
.PloneTestCase
):
42 """Base class used for test cases
45 class PaulaFunctionalTestCase(ptc
.FunctionalTestCase
):
46 """Test case class used for functional (doc-)tests
49 class PaulaPanelTestCase(PaulaFunctionalTestCase
, ControlPanelTestCase
):
50 """Test case used for the control panel tests, with some convenience
51 methods from plone.app.controlpanel.
54 class PaulaKSSTestCase(PaulaFunctionalTestCase
, KSSViewTestCase
):
55 """Test case used for KSS tests
58 class layer(KSSLayer
, PloneSite
):