
Untitled
By: a guest on
May 4th, 2012 | syntax:
None | size: 1.45 KB | hits: 13 | expires: Never
Index: tests.py
===================================================================
--- tests.py (revision 37628)
+++ tests.py (working copy)
@@ -2,8 +2,9 @@
import doctest
from plone.testing import layered
-from plone.app.testing import PLONE_INTEGRATION_TESTING
-from plone.app.testing import PLONE_FUNCTIONAL_TESTING
+from plone.app.testing.layers import IntegrationTesting
+from plone.app.testing.layers import FunctionalTesting
+from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import PloneSandboxLayer
from plone.app.testing import quickInstallProduct
@@ -12,8 +13,9 @@
optionflags = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)
class PABlocks(PloneSandboxLayer):
- defaultBases = (PLONE_INTEGRATION_TESTING,)
+ defaultBases = (PLONE_FIXTURE,)
+
def setUpZope(self, app, configurationContext):
# load ZCML
import plone.app.blocks
@@ -25,9 +27,10 @@
# install into the Plone site
quickInstallProduct(portal, 'plone.app.blocks')
+PABLOCKS_FIXTURE = PABlocks()
-PABLOCKS_INTEGRATION_TESTING = PABlocks()
-PABLOCKS_FUNCTIONAL_TESTING = PABlocks(bases=(PLONE_FUNCTIONAL_TESTING,))
+PABLOCKS_INTEGRATION_TESTING = IntegrationTesting(bases=(PABLOCKS_FIXTURE,), name="PABlocks:Integration")
+PABLOCKS_FUNCTIONAL_TESTING = FunctionalTesting(bases=(PABLOCKS_FIXTURE,), name="PABlocks:Functional")
def test_suite():
suite = unittest.TestSuite()