From 8a121d7ff01e22487aa584a51fde7b551fbb0408 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Thu, 5 Jan 2023 23:39:02 +0100 Subject: [PATCH] Removed testModificationsToPropSheetLinesNotPuged. This test makes no sense in Plone 5.2. It passed until now because 'qi.reinstallProducts' does nothing since Plone 5.1. The site properties are not really used anymore in Plone itself, so we could probably remove this from the default profile. But let's keep it to be safe. This is a maintenance branch. --- src/collective/easyform/tests/testSetup.py | 46 ---------------------- 1 file changed, 46 deletions(-) diff --git a/src/collective/easyform/tests/testSetup.py b/src/collective/easyform/tests/testSetup.py index 4f00f5c2..fe4d472a 100644 --- a/src/collective/easyform/tests/testSetup.py +++ b/src/collective/easyform/tests/testSetup.py @@ -10,13 +10,6 @@ import Products -try: - from Products.CMFPlone.utils import get_installer -except ImportError: - # BBB for Plone 5.0 and lower. - get_installer = None - - def getAddPermission(product, name): """find the add permission for a meta_type""" @@ -100,45 +93,6 @@ def testActionsInstalled(self): self.portal.portal_actions.getActionInfo("object_buttons/saveddata") ) - def testModificationsToPropSheetLinesNotPuged(self): - property_mappings = [ - { - "propsheet": "site_properties", - "added_props": [ - "use_folder_tabs", - "typesLinkToFolderContentsInFC", - "default_page_types", - ], - } - ] - - # add garbage prop element to each lines property - for mapping in property_mappings: - sheet = self.properties[mapping["propsheet"]] - for lines_prop in mapping["added_props"]: - propitems = list(sheet.getProperty(lines_prop)) - propitems.append("foo") - sheet.manage_changeProperties({lines_prop: propitems}) - - # reinstall - if get_installer is None: - qi = self.portal["portal_quickinstaller"] - else: - qi = get_installer(self.portal) - qi.reinstallProducts(["collective.easyform"]) - - # now make sure our garbage values survived the reinstall - for mapping in property_mappings: - sheet = self.properties[mapping["propsheet"]] - for lines_prop in mapping["added_props"]: - self.assertTrue( - "foo" in sheet.getProperty(lines_prop), - "Our garbage item didn't survive reinstall for property " - "{0} within property sheet {1}".format( - lines_prop, mapping["propsheet"] - ), - ) - def test_EasyFormInDefaultPageTypes(self): values = api.portal.get_registry_record("plone.default_page_types") self.assertIn("EasyForm", values)