diff --git a/last_commit.txt b/last_commit.txt index daf01cbfba..1013d7ab3c 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,38 +1,48 @@ -Repository: plone.app.portlets +Repository: Products.CMFFormController Branch: refs/heads/master -Date: 2018-10-03T14:57:29+02:00 -Author: Jens W. Klein (jensens) -Commit: https://github.com/plone/plone.app.portlets/commit/e02e76f341f6c42ae0baa71c501a56c534000f13 +Date: 2018-10-03T13:46:40+02:00 +Author: Peter Mathis (petschki) +Commit: https://github.com/plone/Products.CMFFormController/commit/0b22727d8b50a8bf385e3c67e5d3c0e0018d8752 -remove outdated test and somecleanup +add tearDown method to avoid isolation errors Files changed: -M CHANGES.rst -M plone/app/portlets/tests/base.py -M plone/app/portlets/tests/testDoctests.py -D plone/app/portlets/tests/testViewName.rst +M Products/CMFFormController/tests/testRedirectTo.py -b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 042e331..c698c68 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -45,6 +45,9 @@ Bug fixes:\n away data values that does not come from the \'core\' schema.\n [sunew]\n \n+- Remove an outdated test and some cleanup.\n+ [jensens]\n+\n \n 4.3.1 (2017-08-07)\n ------------------\ndiff --git a/plone/app/portlets/tests/base.py b/plone/app/portlets/tests/base.py\nindex dd9ad5f..b9b2ffb 100644\n--- a/plone/app/portlets/tests/base.py\n+++ b/plone/app/portlets/tests/base.py\n@@ -5,13 +5,12 @@\n products with Zope, and it sets up a sandbox Plone site with the appropriate\n products installed.\n """\n-\n-import unittest\n-\n-from Testing.ZopeTestCase import Functional\n from plone.app.portlets.testing import PLONE_APP_PORTLETS_INTEGRATION_TESTING\n from plone.app.testing import PLONE_FUNCTIONAL_TESTING\n from plone.testing.z2 import Browser\n+from Testing.ZopeTestCase import Functional\n+\n+import unittest\n \n \n class PortletsTestCase(unittest.TestCase):\ndiff --git a/plone/app/portlets/tests/testDoctests.py b/plone/app/portlets/tests/testDoctests.py\nindex 98c0fa6..b9da15e 100644\n--- a/plone/app/portlets/tests/testDoctests.py\n+++ b/plone/app/portlets/tests/testDoctests.py\n@@ -1,18 +1,20 @@\n # -*- coding: utf-8 -*-\n-import doctest\n+from plone.app.portlets.tests.base import PortletsFunctionalTestCase\n+from Testing.ZopeTestCase import FunctionalDocFileSuite\n from unittest import TestSuite\n \n-from Testing.ZopeTestCase import FunctionalDocFileSuite\n+import doctest\n \n-from plone.app.portlets.tests.base import PortletsFunctionalTestCase\n \n def test_suite():\n suite = TestSuite()\n OPTIONFLAGS = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)\n- for testfile in (\'testViewName.rst\', \'testMemberDashboard.rst\'):\n- suite.addTest(FunctionalDocFileSuite(testfile,\n- optionflags=OPTIONFLAGS,\n- package="plone.app.portlets.tests",\n- test_class=PortletsFunctionalTestCase),\n- )\n+ suite.addTest(\n+ FunctionalDocFileSuite(\n+ \'testMemberDashboard.rst\',\n+ optionflags=OPTIONFLAGS,\n+ package="plone.app.portlets.tests",\n+ test_class=PortletsFunctionalTestCase,\n+ ),\n+ )\n return suite\ndiff --git a/plone/app/portlets/tests/testViewName.rst b/plone/app/portlets/tests/testViewName.rst\ndeleted file mode 100644\nindex d369b02..0000000\n--- a/plone/app/portlets/tests/testViewName.rst\n+++ /dev/null\n@@ -1,119 +0,0 @@\n-Setup::\n-\n- >>> import re\n- >>> from plone.app.portlets.browser.editmanager import DashboardEditPortletManagerRenderer\n- >>> from plone.portlets.interfaces import IPortletType\n- >>> from plone.portlets.interfaces import IPortletManager\n- >>> from zope.component import getUtility\n-\n-\n-bug: 11409 test bits\n-----------------------\n-check the names for customized views are in place::\n-\n- >>> portal.manage_permission(\'Portlets: Manage own portlets\', roles=[\'Manager\'], acquire=0)\n- >>> portlet = getUtility(IPortletType, name=\'portlets.News\')\n- >>> col = getUtility(IPortletManager, name=\'plone.dashboard1\')\n- >>> view = portal.unrestrictedTraverse(\'@@manage-dashboard\')\n- >>> renderer = DashboardEditPortletManagerRenderer(self.portal, self.portal.REQUEST, view, col)\n- >>> renderer.view_name == u\'manage-dashboard\'\n- True\n-\n-Now customize the manage dashboard view and check the name is in place too::\n-\n- >>> browser = self.site_administrator_browser\n- >>> browser.open(portal.absolute_url()+\'/portal_view_customizations/registrations.html\')\n- >>> browser.getLink(\'manage-dashboard\').click()\n- >>> managedashboard_template = """\n- ... \n- ...\n- ... \n- ... \n- ... \n- ... \n- ... \n- ... Please note that this template fills the "content" slot instead of the\n- ... "main" slot, this is done so we can provide stuff like the content\n- ... tabs. This also means that we have to supply things that are normally\n- ... present from main_template.\n- ... \n- ... \n- ... \n- ...
\n- ...
Content views
\n- ...
    \n- ...
  • \n- ... Dashboard\n- ...
  • \n- ...
  • \n- ... Edit\n- ...
  • \n- ...
\n- ...\n- ...
\n- ...  \n- ...
\n- ...
\n- ...
\n- ... Portal status message\n- ...
\n- ...
\n- ...

\n- ... Edit your dashboard\n- ...

\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...\n- ...
\n- ... \n- ... \n- ... \n- ... """\n- >>> browser.handleErrors = True\n- >>> browser.getControl(\'Customize\').click()\n- >>> browser.handleErrors = False\n- >>> browser.getControl(name=\'text:text\').value = managedashboard_template\n- >>> browser.getControl(\'Save Changes\').click()\n-\n-Add a portlet in the dashboard and try to delete it::\n-\n- >>> browser.open(portal.absolute_url()+\'/dashboard\')\n- >>> browser.getLink(\'Edit\').click()\n- >>> browser.getControl(name=\':action\',index=0).value = [\'/++dashboard++plone.dashboard1+app/+/portlets.Search\']\n- >>> browser.getForm(index=1).submit()\n- >>> browser.getControl(\'Save\').click() # This submits the now shown add form.\n- >>> browser.open(portal.absolute_url()+\'/@@manage-dashboard\')\n- >>> \'/search/edit\' in browser.contents\n- True\n- >>> browser.getControl(name="search-remove").click()\n- >>> \'/search/edit\' in browser.contents\n- False\n-\n-\n' +b"diff --git a/Products/CMFFormController/tests/testRedirectTo.py b/Products/CMFFormController/tests/testRedirectTo.py\nindex b969fad..4424014 100644\n--- a/Products/CMFFormController/tests/testRedirectTo.py\n+++ b/Products/CMFFormController/tests/testRedirectTo.py\n@@ -67,6 +67,14 @@ def setUp(self):\n 'Authorization', 'Basic {0}:{1}'.format(\n TEST_USER_NAME, TEST_USER_PASSWORD))\n \n+ def tearDown(self):\n+ # still have to delete the created pages manually\n+ # because of test isolation problems\n+ del self.portal['page']\n+ del self.portal['front-page']\n+ transaction.commit()\n+ super(TestRedirectToFunctional, self).tearDown()\n+\n def test_regression(self):\n csrf_token = createToken()\n target = 'front-page'\n" -Repository: plone.app.portlets +Repository: Products.CMFFormController Branch: refs/heads/master -Date: 2018-10-03T15:56:32+02:00 -Author: Jens W. Klein (jensens) -Commit: https://github.com/plone/plone.app.portlets/commit/9d4af4e477fc22f02c42ed49898b58e6b557617f +Date: 2018-10-03T16:00:33+02:00 +Author: Peter Mathis (petschki) +Commit: https://github.com/plone/Products.CMFFormController/commit/646de392e725f7db01ce8f0900e8b8edcbb76c0e -Merge pull request #118 from plone/test-cleanup +add changenote -remove outdated test and somecleanup +Files changed: +A news/18.bugfix + +b'diff --git a/news/18.bugfix b/news/18.bugfix\nnew file mode 100644\nindex 0000000..f7466a7\n--- /dev/null\n+++ b/news/18.bugfix\n@@ -0,0 +1,3 @@\n+fix testisolation problems\n+\n+[petschki]\n\\ No newline at end of file\n' + +Repository: Products.CMFFormController + + +Branch: refs/heads/master +Date: 2018-10-03T17:07:21+02:00 +Author: Peter Mathis (petschki) +Commit: https://github.com/plone/Products.CMFFormController/commit/f1d39e0dfd903b7d218ef20a1fef441bb646c4be + +Merge pull request #18 from plone/testisolation-fix + +testisolation fixes Files changed: -M CHANGES.rst -M plone/app/portlets/tests/base.py -M plone/app/portlets/tests/testDoctests.py -D plone/app/portlets/tests/testViewName.rst +A news/18.bugfix +M Products/CMFFormController/tests/testRedirectTo.py -b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex 042e331..c698c68 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -45,6 +45,9 @@ Bug fixes:\n away data values that does not come from the \'core\' schema.\n [sunew]\n \n+- Remove an outdated test and some cleanup.\n+ [jensens]\n+\n \n 4.3.1 (2017-08-07)\n ------------------\ndiff --git a/plone/app/portlets/tests/base.py b/plone/app/portlets/tests/base.py\nindex dd9ad5f..b9b2ffb 100644\n--- a/plone/app/portlets/tests/base.py\n+++ b/plone/app/portlets/tests/base.py\n@@ -5,13 +5,12 @@\n products with Zope, and it sets up a sandbox Plone site with the appropriate\n products installed.\n """\n-\n-import unittest\n-\n-from Testing.ZopeTestCase import Functional\n from plone.app.portlets.testing import PLONE_APP_PORTLETS_INTEGRATION_TESTING\n from plone.app.testing import PLONE_FUNCTIONAL_TESTING\n from plone.testing.z2 import Browser\n+from Testing.ZopeTestCase import Functional\n+\n+import unittest\n \n \n class PortletsTestCase(unittest.TestCase):\ndiff --git a/plone/app/portlets/tests/testDoctests.py b/plone/app/portlets/tests/testDoctests.py\nindex 98c0fa6..b9da15e 100644\n--- a/plone/app/portlets/tests/testDoctests.py\n+++ b/plone/app/portlets/tests/testDoctests.py\n@@ -1,18 +1,20 @@\n # -*- coding: utf-8 -*-\n-import doctest\n+from plone.app.portlets.tests.base import PortletsFunctionalTestCase\n+from Testing.ZopeTestCase import FunctionalDocFileSuite\n from unittest import TestSuite\n \n-from Testing.ZopeTestCase import FunctionalDocFileSuite\n+import doctest\n \n-from plone.app.portlets.tests.base import PortletsFunctionalTestCase\n \n def test_suite():\n suite = TestSuite()\n OPTIONFLAGS = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)\n- for testfile in (\'testViewName.rst\', \'testMemberDashboard.rst\'):\n- suite.addTest(FunctionalDocFileSuite(testfile,\n- optionflags=OPTIONFLAGS,\n- package="plone.app.portlets.tests",\n- test_class=PortletsFunctionalTestCase),\n- )\n+ suite.addTest(\n+ FunctionalDocFileSuite(\n+ \'testMemberDashboard.rst\',\n+ optionflags=OPTIONFLAGS,\n+ package="plone.app.portlets.tests",\n+ test_class=PortletsFunctionalTestCase,\n+ ),\n+ )\n return suite\ndiff --git a/plone/app/portlets/tests/testViewName.rst b/plone/app/portlets/tests/testViewName.rst\ndeleted file mode 100644\nindex d369b02..0000000\n--- a/plone/app/portlets/tests/testViewName.rst\n+++ /dev/null\n@@ -1,119 +0,0 @@\n-Setup::\n-\n- >>> import re\n- >>> from plone.app.portlets.browser.editmanager import DashboardEditPortletManagerRenderer\n- >>> from plone.portlets.interfaces import IPortletType\n- >>> from plone.portlets.interfaces import IPortletManager\n- >>> from zope.component import getUtility\n-\n-\n-bug: 11409 test bits\n-----------------------\n-check the names for customized views are in place::\n-\n- >>> portal.manage_permission(\'Portlets: Manage own portlets\', roles=[\'Manager\'], acquire=0)\n- >>> portlet = getUtility(IPortletType, name=\'portlets.News\')\n- >>> col = getUtility(IPortletManager, name=\'plone.dashboard1\')\n- >>> view = portal.unrestrictedTraverse(\'@@manage-dashboard\')\n- >>> renderer = DashboardEditPortletManagerRenderer(self.portal, self.portal.REQUEST, view, col)\n- >>> renderer.view_name == u\'manage-dashboard\'\n- True\n-\n-Now customize the manage dashboard view and check the name is in place too::\n-\n- >>> browser = self.site_administrator_browser\n- >>> browser.open(portal.absolute_url()+\'/portal_view_customizations/registrations.html\')\n- >>> browser.getLink(\'manage-dashboard\').click()\n- >>> managedashboard_template = """\n- ... \n- ...\n- ... \n- ... \n- ... \n- ... \n- ... \n- ... Please note that this template fills the "content" slot instead of the\n- ... "main" slot, this is done so we can provide stuff like the content\n- ... tabs. This also means that we have to supply things that are normally\n- ... present from main_template.\n- ... \n- ... \n- ... \n- ...
\n- ...
Content views
\n- ...
    \n- ...
  • \n- ... Dashboard\n- ...
  • \n- ...
  • \n- ... Edit\n- ...
  • \n- ...
\n- ...\n- ...
\n- ...  \n- ...
\n- ...
\n- ...
\n- ... Portal status message\n- ...
\n- ...
\n- ...

\n- ... Edit your dashboard\n- ...

\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...
\n- ...\n- ...
\n- ... \n- ... \n- ... \n- ... """\n- >>> browser.handleErrors = True\n- >>> browser.getControl(\'Customize\').click()\n- >>> browser.handleErrors = False\n- >>> browser.getControl(name=\'text:text\').value = managedashboard_template\n- >>> browser.getControl(\'Save Changes\').click()\n-\n-Add a portlet in the dashboard and try to delete it::\n-\n- >>> browser.open(portal.absolute_url()+\'/dashboard\')\n- >>> browser.getLink(\'Edit\').click()\n- >>> browser.getControl(name=\':action\',index=0).value = [\'/++dashboard++plone.dashboard1+app/+/portlets.Search\']\n- >>> browser.getForm(index=1).submit()\n- >>> browser.getControl(\'Save\').click() # This submits the now shown add form.\n- >>> browser.open(portal.absolute_url()+\'/@@manage-dashboard\')\n- >>> \'/search/edit\' in browser.contents\n- True\n- >>> browser.getControl(name="search-remove").click()\n- >>> \'/search/edit\' in browser.contents\n- False\n-\n-\n' +b"diff --git a/Products/CMFFormController/tests/testRedirectTo.py b/Products/CMFFormController/tests/testRedirectTo.py\nindex b969fad..4424014 100644\n--- a/Products/CMFFormController/tests/testRedirectTo.py\n+++ b/Products/CMFFormController/tests/testRedirectTo.py\n@@ -67,6 +67,14 @@ def setUp(self):\n 'Authorization', 'Basic {0}:{1}'.format(\n TEST_USER_NAME, TEST_USER_PASSWORD))\n \n+ def tearDown(self):\n+ # still have to delete the created pages manually\n+ # because of test isolation problems\n+ del self.portal['page']\n+ del self.portal['front-page']\n+ transaction.commit()\n+ super(TestRedirectToFunctional, self).tearDown()\n+\n def test_regression(self):\n csrf_token = createToken()\n target = 'front-page'\ndiff --git a/news/18.bugfix b/news/18.bugfix\nnew file mode 100644\nindex 0000000..f7466a7\n--- /dev/null\n+++ b/news/18.bugfix\n@@ -0,0 +1,3 @@\n+fix testisolation problems\n+\n+[petschki]\n\\ No newline at end of file\n"