From 2eb8af558696caa2b66aae86e94083aff9703c8d Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Tue, 2 Jun 2015 10:01:21 +0200 Subject: [PATCH 1/3] run all doctests --- Products/CMFQuickInstallerTool/tests/profiles.txt | 11 ++++++++--- Products/CMFQuickInstallerTool/tests/test_install.py | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Products/CMFQuickInstallerTool/tests/profiles.txt b/Products/CMFQuickInstallerTool/tests/profiles.txt index 7a85c3d..ec7e58c 100644 --- a/Products/CMFQuickInstallerTool/tests/profiles.txt +++ b/Products/CMFQuickInstallerTool/tests/profiles.txt @@ -68,6 +68,11 @@ We now expect to see Products.Product1 and Products.Product2 in the list of installable products, but not Products.Product3. >>> installable = [x['id'] for x in qi.listInstallableProducts()] - >>> self.failUnless('Products.Product1' in installable) - >>> self.failUnless('Products.Product2' in installable) - >>> self.failIf('Products.Product3' in installable) + >>> 'Products.Product1' in installable + True + + >>> 'Products.Product2' in installable + True + + >>> 'Products.Product3' in installable + False diff --git a/Products/CMFQuickInstallerTool/tests/test_install.py b/Products/CMFQuickInstallerTool/tests/test_install.py index 143240d..130f4b4 100644 --- a/Products/CMFQuickInstallerTool/tests/test_install.py +++ b/Products/CMFQuickInstallerTool/tests/test_install.py @@ -61,7 +61,7 @@ def test_suite(): for testfile in ['actions.txt', 'profiles.txt', 'install.txt']: suite.addTest(layered( doctest.DocFileSuite( - 'actions.txt', + testfile, package='Products.CMFQuickInstallerTool.tests', optionflags=OPTIONFLAGS), layer=CQI_FUNCTIONAL_TESTING)) From df358c68690cdef4601249a81e94242f08a441ca Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Tue, 2 Jun 2015 10:55:01 +0200 Subject: [PATCH 2/3] fixed doctests --- Products/CMFQuickInstallerTool/tests/install.txt | 2 +- Products/CMFQuickInstallerTool/tests/test_install.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Products/CMFQuickInstallerTool/tests/install.txt b/Products/CMFQuickInstallerTool/tests/install.txt index b5b60d8..46f1db8 100644 --- a/Products/CMFQuickInstallerTool/tests/install.txt +++ b/Products/CMFQuickInstallerTool/tests/install.txt @@ -7,7 +7,7 @@ First we set three convenience variables for later use: >>> from Products.CMFQuickInstallerTool.interfaces import IQuickInstallerTool >>> from Products.CMFCore.utils import getToolByName - >>> portal = layer['plone'] + >>> portal = layer['portal'] >>> portal diff --git a/Products/CMFQuickInstallerTool/tests/test_install.py b/Products/CMFQuickInstallerTool/tests/test_install.py index 130f4b4..d59c6f6 100644 --- a/Products/CMFQuickInstallerTool/tests/test_install.py +++ b/Products/CMFQuickInstallerTool/tests/test_install.py @@ -5,6 +5,7 @@ from Products.GenericSetup import EXTENSION, profile_registry from plone.app import testing from plone.testing import layered +from plone.app.contenttypes.testing import PLONE_APP_CONTENTTYPES_FIXTURE from Products.CMFQuickInstallerTool.QuickInstallerTool import QuickInstallerTool from Products.CMFQuickInstallerTool.events import handleBeforeProfileImportEvent @@ -17,7 +18,7 @@ class QuickInstallerCaseFixture(testing.PloneSandboxLayer): - defaultBases = (testing.PLONE_FIXTURE, ) + defaultBases = (PLONE_APP_CONTENTTYPES_FIXTURE, ) def setUpZope(self, app, configurationContext): sm = zope.component.getSiteManager() From cb04fc46e09ac2d73c958eb4d20348bbda5b9f4c Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Tue, 2 Jun 2015 10:56:01 +0200 Subject: [PATCH 3/3] document changes --- CHANGES.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index acb2cfa..ad60c97 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog 3.0.9 (unreleased) ------------------ -- Nothing changed yet. +- Readded doctests which were not run after port to plone.app.testing + [tomgross] 3.0.8 (2015-03-21)