Skip to content

Commit

Permalink
Fix tests for plone.app.contenttypes unified view names, which uses l…
Browse files Browse the repository at this point in the history
…isting_view for Folder and Collection types.
  • Loading branch information
thet committed Feb 27, 2015
1 parent 54f1d66 commit 598cbc4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Expand Up @@ -8,6 +8,10 @@ Changelog
5.0b1 (unreleased)
------------------

- Fix tests for plone.app.contenttypes unified view names, which uses
``listing_view`` for Folder and Collection types.
[thet]

- Remove ``selectable_views`` from ``properties.xml``, which isn't used
anywhere anymore.
[thet]
Expand Down
4 changes: 2 additions & 2 deletions Products/CMFPlone/browser/ploneview.py
Expand Up @@ -116,9 +116,9 @@ def showEditableBorder(self):
idActions[obj.get('id', '')] = 1

if 'edit' in idActions:
if (template_id in idActions or \
if (template_id in idActions or
template_id in ['synPropertiesForm', 'folder_contents',
'folder_listing']):
'folder_listing', 'listing_view']):
return True

# Check to see if the user is able to add content
Expand Down
8 changes: 6 additions & 2 deletions Products/CMFPlone/tests/testBrowserDefault.py
Expand Up @@ -228,8 +228,12 @@ def testFolderDefaultPageSameAsSelfWithPageMissing(self):
self.assertEqual(self.putils.browserDefault(f),
(f, [f.getId()],))
f._delObject(f.getId())
self.assertEqual(self.putils.browserDefault(f),
(f, ['folder_listing'],))
self.assertTrue(
self.putils.browserDefault(f) == (f, ['folder_listing'],)
or
self.putils.browserDefault(f) == (f, ['listing_view'],)
# plone.app.contenttypes has unified views
)

def testDefaultPageSetting(self):
sp = getToolByName(self.portal, "portal_properties").site_properties
Expand Down

0 comments on commit 598cbc4

Please sign in to comment.