Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 1.45 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Index: tests.py
  2. ===================================================================
  3. --- tests.py    (revision 37628)
  4. +++ tests.py    (working copy)
  5. @@ -2,8 +2,9 @@
  6.  import doctest
  7.  from plone.testing import layered
  8.  
  9. -from plone.app.testing import PLONE_INTEGRATION_TESTING
  10. -from plone.app.testing import PLONE_FUNCTIONAL_TESTING
  11. +from plone.app.testing.layers import IntegrationTesting
  12. +from plone.app.testing.layers import FunctionalTesting
  13. +from plone.app.testing import PLONE_FIXTURE
  14.  from plone.app.testing import PloneSandboxLayer
  15.  from plone.app.testing import quickInstallProduct
  16.  
  17. @@ -12,8 +13,9 @@
  18.  optionflags = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)
  19.  
  20.  class PABlocks(PloneSandboxLayer):
  21. -    defaultBases = (PLONE_INTEGRATION_TESTING,)
  22.  
  23. +    defaultBases = (PLONE_FIXTURE,)
  24. +
  25.      def setUpZope(self, app, configurationContext):
  26.          # load ZCML
  27.          import plone.app.blocks
  28. @@ -25,9 +27,10 @@
  29.          # install into the Plone site
  30.          quickInstallProduct(portal, 'plone.app.blocks')
  31.  
  32. +PABLOCKS_FIXTURE = PABlocks()
  33.  
  34. -PABLOCKS_INTEGRATION_TESTING = PABlocks()
  35. -PABLOCKS_FUNCTIONAL_TESTING = PABlocks(bases=(PLONE_FUNCTIONAL_TESTING,))
  36. +PABLOCKS_INTEGRATION_TESTING = IntegrationTesting(bases=(PABLOCKS_FIXTURE,), name="PABlocks:Integration")
  37. +PABLOCKS_FUNCTIONAL_TESTING = FunctionalTesting(bases=(PABLOCKS_FIXTURE,), name="PABlocks:Functional")
  38.  
  39.  def test_suite():
  40.      suite = unittest.TestSuite()