Skip to content

Commit

Permalink
Removed testModificationsToPropSheetLinesNotPuged.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mauritsvanrees committed Jan 5, 2023
1 parent 521f601 commit 8a121d7
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions src/collective/easyform/tests/testSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8a121d7

Please sign in to comment.