Merge pull request #168 from plone/towards_plone6

Fix test for Plone > 5
This commit is contained in:
Jens W. Klein 2020-02-12 14:18:43 +01:00 committed by GitHub
commit 165a667db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

2
news/168.bugfix Normal file
View File

@ -0,0 +1,2 @@
Fix tests failing for Plone 6, deprecate Plone 4 and older.
[tschorr]

View File

@ -269,9 +269,8 @@ Use the Plone control panel to enable comment editing.
Extract the edit comment url from the first "edit comment" button
>>> from Products.CMFPlone import __version__
>>> browser.open(urldoc1)
>>> url = __version__[0] == '5' and browser.getLink(url='@@edit-comment').url or browser.getForm(name='edit', index=0).action
>>> url = browser.getLink(url='@@edit-comment').url
>>> '@@edit-comment' in url
True
@ -299,7 +298,7 @@ Check it ain't so.
Opening the edit comment view, then cancel, does nothing.
>>> url = __version__[0] == '5' and browser.getLink(url='@@edit-comment').url or browser.getForm(name='edit', index=0).action
>>> url = browser.getLink(url='@@edit-comment').url
>>> '@@edit-comment' in url
True
>>> browser.open(url)