Skip to content

Commit

Permalink
[fc] Repository: plone.app.customerize
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2022-03-08T20:59:56+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.customerize@dd92054

Fixed tests when run with zope.component 5+.

See plone/plone.app.users#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) <maurits@vanrees.org>
Commit: plone/plone.app.customerize@71f66fb

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
  • Loading branch information
mauritsvanrees committed Mar 16, 2022
1 parent 8b772fe commit 185f58a
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
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) <maurits@vanrees.org>
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+.

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) <maurits@vanrees.org>
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"

0 comments on commit 185f58a

Please sign in to comment.