Skip to content

Commit

Permalink
Skip uninstall test when CMFQuickInstallerTool is too old.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Sep 19, 2019
1 parent db15f43 commit 6ddb9a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plone/app/ldap/tests/test_controlpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
from plone.app.ldap.config import PROJECTNAME
from plone.app.ldap.testing import INTEGRATION_TESTING

import pkg_resources
import unittest

qi_dist = pkg_resources.get_distribution("Products.CMFQuickInstallerTool")
if qi_dist.parsed_version > pkg_resources.parse_version("3.0.9"):
# This version uses the uninstall profile.
SKIP_UNINSTALL_TEST = False
else:
SKIP_UNINSTALL_TEST = True


class ControlPanelTestCase(unittest.TestCase):

Expand All @@ -32,6 +40,8 @@ def test_controlpanel_installed(self):
a.getAction(self)['id'] for a in self.controlpanel.listActions()]
self.assertIn('ldap', actions)

@unittest.skipIf(SKIP_UNINSTALL_TEST,
"uninstall not supported with this old quick installer")
def test_controlpanel_removed_on_uninstall(self):
qi = self.portal['portal_quickinstaller']

Expand Down

0 comments on commit 6ddb9a3

Please sign in to comment.