From 185f58acb6410dbe33b551eaf75951a7d53ea2fc Mon Sep 17 00:00:00 2001 From: mauritsvanrees Date: Wed, 16 Mar 2022 09:25:59 +0100 Subject: [PATCH] [fc] Repository: plone.app.customerize Branch: refs/heads/master Date: 2022-03-08T20:59:56+01:00 Author: Maurits van Rees (mauritsvanrees) Commit: https://github.com/plone/plone.app.customerize/commit/dd920548cfaba228a292f4bcedccbbec14f2ece0 Fixed tests when run with zope.component 5+. See https://github.com/plone/plone.app.users/pull/107 Files changed: A news/500.bugfix M plone/app/customerize/tests/testBrowserLayers.txt Repository: plone.app.customerize Branch: refs/heads/master Date: 2022-03-16T09:25:59+01:00 Author: Maurits van Rees (mauritsvanrees) Commit: https://github.com/plone/plone.app.customerize/commit/71f66fbf604928be16f627d43ec265f91e5e6218 Merge pull request #20 from plone/maurits-zope-component-5 Fixed tests when run with zope.component 5+. Files changed: A news/500.bugfix M plone/app/customerize/tests/testBrowserLayers.txt --- last_commit.txt | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index 7a477b030f..379ffda1a6 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,10 +1,10 @@ -Repository: Products.CMFPlone +Repository: plone.app.customerize Branch: refs/heads/master -Date: 2022-03-16T09:25:47+01:00 +Date: 2022-03-08T20:59:56+01:00 Author: Maurits van Rees (mauritsvanrees) -Commit: https://github.com/plone/Products.CMFPlone/commit/3061816dce48b25a75c7f77af764541508847ee5 +Commit: https://github.com/plone/plone.app.customerize/commit/dd920548cfaba228a292f4bcedccbbec14f2ece0 Fixed tests when run with zope.component 5+. @@ -12,7 +12,25 @@ See https://github.com/plone/plone.app.users/pull/107 Files changed: A news/500.bugfix -M Products/CMFPlone/tests/testSecurity.py +M plone/app/customerize/tests/testBrowserLayers.txt -b'diff --git a/Products/CMFPlone/tests/testSecurity.py b/Products/CMFPlone/tests/testSecurity.py\nindex ee2fa5c467..5286d8ee2a 100644\n--- a/Products/CMFPlone/tests/testSecurity.py\n+++ b/Products/CMFPlone/tests/testSecurity.py\n@@ -159,7 +159,8 @@ def get_admin_browser(self):\n return browser\n \n def test_plonetool(self):\n- base_url = self.layer["portal"].absolute_url() + "/plone_utils"\n+ portal_url = self.layer["portal"].absolute_url()\n+ base_url = portal_url + "/plone_utils"\n browser = self.get_admin_browser()\n method_names = (\n "addPortalMessage",\n@@ -173,6 +174,9 @@ def test_plonetool(self):\n "normalizeString",\n "getEmptyTitle",\n )\n+ # First open a url that actually works.\n+ # This avoids an error with zope.component 5+.\n+ browser.open(portal_url)\n for method_name in method_names:\n with self.assertRaises(NotFound):\n browser.open(base_url + "/" + method_name)\n@@ -226,6 +230,9 @@ def test_hotfix_20160419(self):\n "propertyLabel",\n "propertyDescription",\n )\n+ # First open a url that actually works.\n+ # This avoids an error with zope.component 5+.\n+ browser.open(portal_url)\n for method_name in method_names:\n with self.assertRaises(NotFound):\n browser.open(portal_url + "/" + method_name)\ndiff --git a/news/500.bugfix b/news/500.bugfix\nnew file mode 100644\nindex 0000000000..c9f39b6b50\n--- /dev/null\n+++ b/news/500.bugfix\n@@ -0,0 +1,2 @@\n+Fixed tests when run with ``zope.component`` 5+.\n+[maurits]\n' +b"diff --git a/news/500.bugfix b/news/500.bugfix\nnew file mode 100644\nindex 0000000..c9f39b6\n--- /dev/null\n+++ b/news/500.bugfix\n@@ -0,0 +1,2 @@\n+Fixed tests when run with ``zope.component`` 5+.\n+[maurits]\ndiff --git a/plone/app/customerize/tests/testBrowserLayers.txt b/plone/app/customerize/tests/testBrowserLayers.txt\nindex 2077917..095e8c4 100644\n--- a/plone/app/customerize/tests/testBrowserLayers.txt\n+++ b/plone/app/customerize/tests/testBrowserLayers.txt\n@@ -20,6 +20,10 @@ product is installed, we cannot view the view, though:\n >>> browser.handleErrors = False\n >>> browser.addHeader('Authorization', 'Basic %s:%s' % (\n ... SITE_OWNER_NAME, SITE_OWNER_PASSWORD))\n+\n+First open the site root. This avoids a crazy testing-only error with zope.component 5.\n+\n+ >>> browser.open('http://nohost/plone/')\n >>> browser.open('http://nohost/plone/@@layer-test-view')\n Traceback (most recent call last):\n ...\n" + +Repository: plone.app.customerize + + +Branch: refs/heads/master +Date: 2022-03-16T09:25:59+01:00 +Author: Maurits van Rees (mauritsvanrees) +Commit: https://github.com/plone/plone.app.customerize/commit/71f66fbf604928be16f627d43ec265f91e5e6218 + +Merge pull request #20 from plone/maurits-zope-component-5 + +Fixed tests when run with zope.component 5+. + +Files changed: +A news/500.bugfix +M plone/app/customerize/tests/testBrowserLayers.txt + +b"diff --git a/news/500.bugfix b/news/500.bugfix\nnew file mode 100644\nindex 0000000..c9f39b6\n--- /dev/null\n+++ b/news/500.bugfix\n@@ -0,0 +1,2 @@\n+Fixed tests when run with ``zope.component`` 5+.\n+[maurits]\ndiff --git a/plone/app/customerize/tests/testBrowserLayers.txt b/plone/app/customerize/tests/testBrowserLayers.txt\nindex 2077917..095e8c4 100644\n--- a/plone/app/customerize/tests/testBrowserLayers.txt\n+++ b/plone/app/customerize/tests/testBrowserLayers.txt\n@@ -20,6 +20,10 @@ product is installed, we cannot view the view, though:\n >>> browser.handleErrors = False\n >>> browser.addHeader('Authorization', 'Basic %s:%s' % (\n ... SITE_OWNER_NAME, SITE_OWNER_PASSWORD))\n+\n+First open the site root. This avoids a crazy testing-only error with zope.component 5.\n+\n+ >>> browser.open('http://nohost/plone/')\n >>> browser.open('http://nohost/plone/@@layer-test-view')\n Traceback (most recent call last):\n ...\n"