diff --git a/Products/CMFFormController/tests/testRedirectTo.py b/Products/CMFFormController/tests/testRedirectTo.py index 4424014..35a9628 100644 --- a/Products/CMFFormController/tests/testRedirectTo.py +++ b/Products/CMFFormController/tests/testRedirectTo.py @@ -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 @@ -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 diff --git a/news/3057.bugfix b/news/3057.bugfix new file mode 100644 index 0000000..3f3971f --- /dev/null +++ b/news/3057.bugfix @@ -0,0 +1,2 @@ +Tests: set request method to POST in a way that works on Plone 6 as well. +[maurits]