From 49485796c159d2e9f7ba38b4f499e83bff0d565a Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Tue, 27 Nov 2012 14:07:21 +0000 Subject: [PATCH] Improved the uninstall test. svn path=/collective.sharerizer/trunk/; revision=251774 --- collective/sharerizer/tests/test_unittests.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/collective/sharerizer/tests/test_unittests.py b/collective/sharerizer/tests/test_unittests.py index 0f0230c..8e0db2c 100644 --- a/collective/sharerizer/tests/test_unittests.py +++ b/collective/sharerizer/tests/test_unittests.py @@ -2,17 +2,13 @@ from Products.CMFCore.utils import getToolByName from collective.sharerizer.tests.base import FunctionalTestCase + class TestUninstallation(FunctionalTestCase): def testUninstallationLeavesNoCruft(self): - # GS doesn't remove our changes to portal_properties or - # portal_controlpanel - # uninstall our product - # XXX: for some reason, our uninstall function isn't getting called - # during testing, but is during normal use. qi = getToolByName(self.portal, "portal_quickinstaller") - qi.uninstallProducts(products=['collective.sharerizer',]) + qi.uninstallProducts(products=['collective.sharerizer']) # no property sheet in portal_properties portal_properties = getToolByName(self.portal, "portal_properties") @@ -20,7 +16,8 @@ def testUninstallationLeavesNoCruft(self): # no configlet registered controlpanel = getToolByName(self.portal, "portal_controlpanel") - self.failIf(hasattr(portal_properties, 'sharerizer')) + self.failIf(controlpanel.getActionObject('Products/sharerizer')) + def test_suite(): suite = unittest.TestSuite()