paula.testing: test for finding txt files + minor bugfix
[paula/paual.testing.git] / paula.plonepas / src / paula / plonepas / tests / plone_base.py
blob2c87bbd9318e83f6b9a96739874640b78bc66118
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
12 @onsetup
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.
18 """
20 # Load the ZCML configuration for the optilux.policy package.
21 # This includes the other products below as well.
23 fiveconfigure.debug_mode = True
24 import paula.plonepas
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
30 # the ZCML.
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
43 """
45 class PaulaFunctionalTestCase(ptc.FunctionalTestCase):
46 """Test case class used for functional (doc-)tests
47 """
49 class PaulaPanelTestCase(PaulaFunctionalTestCase, ControlPanelTestCase):
50 """Test case used for the control panel tests, with some convenience
51 methods from plone.app.controlpanel.
52 """
54 class PaulaKSSTestCase(PaulaFunctionalTestCase, KSSViewTestCase):
55 """Test case used for KSS tests
56 """
58 class layer(KSSLayer, PloneSite):
59 pass