Skip to content

Commit

Permalink
Merge pull request #8 from plone/tomgross-fixdoctests
Browse files Browse the repository at this point in the history
Readded doctests which were not run after migration to p.a.testing
  • Loading branch information
pbauer committed Jun 2, 2015
2 parents ee144f9 + cb04fc4 commit 135eb81
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Products/CMFQuickInstallerTool/tests/install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
<PloneSite at /plone>

Expand Down
11 changes: 8 additions & 3 deletions Products/CMFQuickInstallerTool/tests/profiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 additions & 2 deletions Products/CMFQuickInstallerTool/tests/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -61,7 +62,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))
Expand Down

0 comments on commit 135eb81

Please sign in to comment.