Skip to content

Commit

Permalink
Merge pull request #26 from plone/maurits/folder_publish
Browse files Browse the repository at this point in the history
Tests: set request method to POST in a way that works on Plone 6 too
  • Loading branch information
jensens authored Sep 28, 2020
2 parents 8abf259 + 72b57cf commit a3b0b67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Products/CMFFormController/tests/testRedirectTo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from plone.app.testing import TEST_USER_ID
from plone.app.testing import TEST_USER_NAME
from plone.app.testing import TEST_USER_PASSWORD
from plone.testing.zope import Browser
from plone.protect import createToken
from plone.testing.z2 import Browser

import transaction
import unittest
Expand Down Expand Up @@ -98,6 +98,7 @@ def test_attacker_redirect(self):

# The same without the testbrowser
self.assertIsNone(self.request.response.headers.get('location'))
self.request.environ["REQUEST_METHOD"] = "POST"
self.request.REQUEST_METHOD = 'POST'
self.request.form['workflow_action'] = 'publish'
self.request.form['paths'] = path
Expand Down
2 changes: 2 additions & 0 deletions news/3057.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Tests: set request method to POST in a way that works on Plone 6 as well.
[maurits]

0 comments on commit a3b0b67

Please sign in to comment.