From d96b25c0895d543bf398058368849f9fc3d5eb6f Mon Sep 17 00:00:00 2001 From: gforcada Date: Tue, 21 Jan 2025 15:48:03 +0100 Subject: [PATCH] [fc] Repository: plone.app.testing Branch: refs/heads/master Date: 2025-01-20T21:06:59+01:00 Author: Maurits van Rees (mauritsvanrees) Commit: https://github.com/plone/plone.app.testing/commit/23235ecbc1a59a0b991bce2c9597fbd176fd1825 Fix DeprecationWarnings. Files changed: A news/4090.bugfix M docs/README.rst M setup.py M src/plone/app/testing/helpers.py M src/plone/app/testing/layers.py M src/plone/app/testing/selenium.rst M src/plone/app/testing/selenium_layers.py Repository: plone.app.testing Branch: refs/heads/master Date: 2025-01-21T15:48:03+01:00 Author: Gil Forcada Codinachs (gforcada) Commit: https://github.com/plone/plone.app.testing/commit/f8ae59cb9e625918a3995669c492bc1bb5a09937 Merge pull request #104 from plone/maurits-warnings Fix DeprecationWarnings. Files changed: A news/4090.bugfix M docs/README.rst M setup.py M src/plone/app/testing/helpers.py M src/plone/app/testing/layers.py M src/plone/app/testing/selenium.rst M src/plone/app/testing/selenium_layers.py --- last_commit.txt | 64 +++++++++++++++---------------------------------- 1 file changed, 19 insertions(+), 45 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index d27d93ff07..5f7c093c8b 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,70 +1,44 @@ -Repository: plone.app.users +Repository: plone.app.testing Branch: refs/heads/master -Date: 2025-01-20T21:15:15+01:00 +Date: 2025-01-20T21:06:59+01:00 Author: Maurits van Rees (mauritsvanrees) -Commit: https://github.com/plone/plone.app.users/commit/29428b19b5e977dac3f4bc69fdae1cb9db598970 +Commit: https://github.com/plone/plone.app.testing/commit/23235ecbc1a59a0b991bce2c9597fbd176fd1825 Fix DeprecationWarnings. Files changed: A news/4090.bugfix -M plone/app/users/browser/account.py -M plone/app/users/browser/configure.zcml -M plone/app/users/testing.py -M plone/app/users/tests/base.py -M plone/app/users/tests/duplicate_email.rst -M plone/app/users/tests/email_login.rst -M plone/app/users/tests/flexible_user_registration.rst -M plone/app/users/tests/forms_navigationroot.rst -M plone/app/users/tests/member_search.rst -M plone/app/users/tests/password.rst -M plone/app/users/tests/personal_preferences.rst -M plone/app/users/tests/personal_preferences_prefs_user_details.rst -M plone/app/users/tests/registration_forms.rst -M plone/app/users/tests/test_account.py -M plone/app/users/tests/test_pam.py -M plone/app/users/tests/test_schema_types.py -M plone/app/users/tests/userdata.rst -M plone/app/users/tests/userdata_prefs_user_details.rst +M docs/README.rst M setup.py +M src/plone/app/testing/helpers.py +M src/plone/app/testing/layers.py +M src/plone/app/testing/selenium.rst +M src/plone/app/testing/selenium_layers.py -b'diff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/app/users/browser/account.py b/plone/app/users/browser/account.py\nindex b9aa9fd..05ccc76 100644\n--- a/plone/app/users/browser/account.py\n+++ b/plone/app/users/browser/account.py\n@@ -2,12 +2,12 @@\n from Acquisition import aq_inner\n from PIL import Image\n from PIL import UnidentifiedImageError\n-from plone.app.layout.navigation.interfaces import INavigationRoot\n from plone.app.users.browser.interfaces import IAccountPanelForm\n from plone.app.users.browser.schemaeditor import getFromBaseSchema\n from plone.app.users.utils import notifyWidgetActionExecutionError\n from plone.autoform.form import AutoExtensibleForm\n from plone.base import PloneMessageFactory as _\n+from plone.base.interfaces import INavigationRoot\n from plone.base.interfaces import IPloneSiteRoot\n from plone.base.interfaces import ISecuritySchema\n from plone.base.utils import safe_text\ndiff --git a/plone/app/users/browser/configure.zcml b/plone/app/users/browser/configure.zcml\nindex 63d6592..2e8677d 100644\n--- a/plone/app/users/browser/configure.zcml\n+++ b/plone/app/users/browser/configure.zcml\n@@ -13,14 +13,14 @@\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n@@ -93,13 +93,13 @@\n \n \n \n \n >> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n >>> browser = Browser(layer[\'app\'])\n >>> browser.open(\'http://nohost/plone/\')\n >>> browser.getLink(\'Log in\').click()\ndiff --git a/plone/app/users/tests/email_login.rst b/plone/app/users/tests/email_login.rst\nindex 70d314d..2d6d97b 100644\n--- a/plone/app/users/tests/email_login.rst\n+++ b/plone/app/users/tests/email_login.rst\n@@ -8,7 +8,7 @@ Set up\n >>> from plone.app.testing import SITE_OWNER_NAME\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/flexible_user_registration.rst b/plone/app/users/tests/flexible_user_registration.rst\nindex a3fae15..e533195 100644\n--- a/plone/app/users/tests/flexible_user_registration.rst\n+++ b/plone/app/users/tests/flexible_user_registration.rst\n@@ -2,7 +2,7 @@\n Testing the flexible user registration\n ======================================\n \n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n >>> import transaction\n >>> app = layer[\'app\']\ndiff --git a/plone/app/users/tests/forms_navigationroot.rst b/plone/app/users/tests/forms_navigationroot.rst\nindex 35de379..3038a52 100644\n--- a/plone/app/users/tests/forms_navigationroot.rst\n+++ b/plone/app/users/tests/forms_navigationroot.rst\n@@ -9,10 +9,10 @@ Set up\n ======\n \n >>> from Products.Five.utilities.marker import mark\n- >>> from plone.app.layout.navigation.interfaces import INavigationRoot\n+ >>> from plone.base.interfaces import INavigationRoot\n >>> from plone.app.testing import SITE_OWNER_NAME\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/member_search.rst b/plone/app/users/tests/member_search.rst\nindex eeb4743..92a21d0 100644\n--- a/plone/app/users/tests/member_search.rst\n+++ b/plone/app/users/tests/member_search.rst\n@@ -12,7 +12,7 @@ Set up\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/password.rst b/plone/app/users/tests/password.rst\nindex 510983e..8224669 100644\n--- a/plone/app/users/tests/password.rst\n+++ b/plone/app/users/tests/password.rst\n@@ -9,7 +9,7 @@ Set up\n \n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/personal_preferences.rst b/plone/app/users/tests/personal_preferences.rst\nindex b0d3fe0..c728ec6 100644\n--- a/plone/app/users/tests/personal_preferences.rst\n+++ b/plone/app/users/tests/personal_preferences.rst\n@@ -8,7 +8,7 @@ Set up\n \n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/personal_preferences_prefs_user_details.rst b/plone/app/users/tests/personal_preferences_prefs_user_details.rst\nindex 4b3745d..460eb73 100644\n--- a/plone/app/users/tests/personal_preferences_prefs_user_details.rst\n+++ b/plone/app/users/tests/personal_preferences_prefs_user_details.rst\n@@ -6,7 +6,7 @@ Set up\n \n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/registration_forms.rst b/plone/app/users/tests/registration_forms.rst\nindex e891896..97b209c 100644\n--- a/plone/app/users/tests/registration_forms.rst\n+++ b/plone/app/users/tests/registration_forms.rst\n@@ -12,7 +12,7 @@ Testing the flexible user registration\n \n >>> import transaction\n >>> transaction.commit()\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n >>> browser = Browser(layer[\'app\'])\n >>> browser.open(\'http://nohost/plone\')\n >>> list_widget_suffix = \':list\'\ndiff --git a/plone/app/users/tests/test_account.py b/plone/app/users/tests/test_account.py\nindex 084d121..a71aec9 100644\n--- a/plone/app/users/tests/test_account.py\n+++ b/plone/app/users/tests/test_account.py\n@@ -1,5 +1,5 @@\n from plone.app.users.browser.account import AccountPanelSchemaAdapter\n-from plone.testing import z2\n+from plone.testing import zope\n from Products.CMFCore.interfaces import IMembershipTool\n from zope.component import provideUtility\n from zope.interface import implementer\n@@ -23,7 +23,7 @@ def checkPermission(self, permission, context):\n \n \n class TestAccountPanelSchemaAdapter(unittest.TestCase):\n- layer = z2.INTEGRATION_TESTING\n+ layer = zope.INTEGRATION_TESTING\n \n def test__init__no_userid(self):\n """Should edit current user."""\ndiff --git a/plone/app/users/tests/test_pam.py b/plone/app/users/tests/test_pam.py\nindex 5e4a94b..70dd736 100644\n--- a/plone/app/users/tests/test_pam.py\n+++ b/plone/app/users/tests/test_pam.py\n@@ -7,7 +7,7 @@\n from plone.app.testing import TEST_USER_NAME\n from plone.app.testing import TEST_USER_PASSWORD\n from plone.app.testing.layers import FunctionalTesting\n-from plone.testing import z2\n+from plone.testing import zope\n from Products.CMFCore.utils import getToolByName\n \n import unittest\n@@ -36,7 +36,7 @@ class TestUserDataPanelWithPAM(unittest.TestCase):\n layer = WITHPAM_FUNCTIONAL_TESTING\n \n def test_pam(self):\n- browser = z2.Browser(self.layer["app"])\n+ browser = zope.Browser(self.layer["app"])\n browser.addHeader(\n "Authorization", f"Basic {TEST_USER_NAME}:{TEST_USER_PASSWORD}"\n )\ndiff --git a/plone/app/users/tests/test_schema_types.py b/plone/app/users/tests/test_schema_types.py\nindex d943cdf..9783a69 100644\n--- a/plone/app/users/tests/test_schema_types.py\n+++ b/plone/app/users/tests/test_schema_types.py\n@@ -6,7 +6,7 @@\n from plone.app.testing import TEST_USER_PASSWORD\n from plone.app.users.setuphandlers import import_schema\n from plone.app.users.tests.base import BaseTestCase\n-from plone.testing.z2 import Browser\n+from plone.testing.zope import Browser\n from Products.GenericSetup.tests.common import DummyImportContext\n \n import transaction\ndiff --git a/plone/app/users/tests/userdata.rst b/plone/app/users/tests/userdata.rst\nindex 2449697..f9fe604 100644\n--- a/plone/app/users/tests/userdata.rst\n+++ b/plone/app/users/tests/userdata.rst\n@@ -8,7 +8,7 @@ Set Up\n >>> from plone.app.testing import TEST_USER_ID\n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> import transaction\n \ndiff --git a/plone/app/users/tests/userdata_prefs_user_details.rst b/plone/app/users/tests/userdata_prefs_user_details.rst\nindex dcc7e45..90606da 100644\n--- a/plone/app/users/tests/userdata_prefs_user_details.rst\n+++ b/plone/app/users/tests/userdata_prefs_user_details.rst\n@@ -7,7 +7,7 @@ Set Up\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n >>> from plone.app.testing import TEST_USER_ID\n >>> from plone.app.testing import TEST_USER_NAME\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> import transaction\n \ndiff --git a/setup.py b/setup.py\nindex 12ad8f9..51ece33 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -64,7 +64,6 @@\n "Products.PlonePAS >= 5.0.1",\n "Products.statusmessages",\n "Zope",\n- "plone.app.layout",\n "plone.autoform >= 1.2",\n "plone.app.event",\n "plone.app.vocabularies",\n' +b'diff --git a/docs/README.rst b/docs/README.rst\nindex 02f29ed..2ec49ca 100644\n--- a/docs/README.rst\n+++ b/docs/README.rst\n@@ -47,7 +47,7 @@ In ``setup.py``, add or modify the ``extras_require`` option, like so::\n ]\n },\n \n-This will also include ``plone.testing``, with the ``[z2]``, ``[zca]`` and\n+This will also include ``plone.testing``, with the ``[security]``, ``[zca]`` and\n ``[zodb]`` extras (which ``plone.app.testing`` itself relies on).\n \n Please see the `plone.testing`_ documentation for more details about how to\n@@ -131,12 +131,12 @@ Plone site fixture\n +------------+--------------------------------------------------+\n | Class: | ``plone.app.testing.layers.PloneFixture`` |\n +------------+--------------------------------------------------+\n-| Bases: | ``plone.testing.z2.STARTUP`` |\n+| Bases: | ``plone.testing.zope.STARTUP`` |\n +------------+--------------------------------------------------+\n | Resources: | |\n +------------+--------------------------------------------------+\n \n-This layer sets up the Plone site fixture on top of the ``z2.STARTUP``\n+This layer sets up the Plone site fixture on top of the ``zope.STARTUP``\n fixture.\n \n You should not use this layer directly, as it does not provide any test\n@@ -212,7 +212,7 @@ Integration and functional testing test lifecycles\n \n ``plone.app.testing`` comes with two layer classes, ``IntegrationTesting``\n and ``FunctionalTesting``, which derive from the corresponding layer classes\n-in ``plone.testing.z2``.\n+in ``plone.testing.zope``.\n \n These classes set up the ``app``, ``request`` and ``portal`` resources, and\n reset the fixture (including various global caches) between each test run.\n@@ -299,7 +299,7 @@ Plone ZServer\n +------------+--------------------------------------------------+\n | Layer: | ``plone.app.testing.PLONE_ZSERVER`` |\n +------------+--------------------------------------------------+\n-| Class: | ``plone.testing.z2.ZServer`` |\n+| Class: | ``plone.testing.zope.ZServer`` |\n +------------+--------------------------------------------------+\n | Bases: | ``plone.app.testing.PLONE_FUNCTIONAL_TESTING`` |\n +------------+--------------------------------------------------+\n@@ -313,7 +313,7 @@ Again, you would not normally extend this layer. To create a custom layer\n that has a running ZServer, you can use the same pattern as this one, e.g.::\n \n from plone.testing import Layer\n- from plone.testing import z2\n+ from plone.testing import zserver\n from plone.app.testing import PLONE_FIXTURE\n from plone.app.testing import FunctionalTesting\n \n@@ -323,9 +323,9 @@ that has a running ZServer, you can use the same pattern as this one, e.g.::\n ...\n \n MY_FIXTURE = MyFixture()\n- MY_ZSERVER = FunctionalTesting(bases=(MY_FIXTURE, z2.ZSERVER_FIXTURE), name=\'MyFixture:ZServer\')\n+ MY_ZSERVER = FunctionalTesting(bases=(MY_FIXTURE, zserver.ZSERVER_FIXTURE), name=\'MyFixture:ZServer\')\n \n-See the description of the ``z2.ZSERVER`` layer in `plone.testing`_\n+See the description of the ``zserver.ZSERVER`` layer in `plone.testing`_\n for further details.\n \n Plone FTP server\n@@ -337,7 +337,7 @@ Plone FTP server\n | Class: | ``plone.app.testing.layers.FunctionalTesting`` |\n +------------+--------------------------------------------------+\n | Bases: | ``plone.app.testing.PLONE_FIXTURE`` |\n-| | ``plone.testing.z2.ZSERVER_FIXTURE`` |\n+| | ``plone.testing.zserver.ZSERVER_FIXTURE`` |\n +------------+--------------------------------------------------+\n | Resources: | ``portal`` (test setup only) |\n +------------+--------------------------------------------------+\n@@ -346,7 +346,7 @@ This is layer is intended for functional testing using a live FTP server.\n \n It is semantically equivalent to the ``PLONE_ZSERVER`` layer.\n \n-See the description of the ``z2.FTP_SERVER`` layer in `plone.testing`_\n+See the description of the ``zserver.FTP_SERVER`` layer in `plone.testing`_\n for further details.\n \n Helper functions\n@@ -406,7 +406,7 @@ User management\n ---------------\n \n ``login(portal, userName)``\n- Simulate login as the given user. This is based on the ``z2.login()``\n+ Simulate login as the given user. This is based on the ``zope.login()``\n helper in `plone.testing`_, but instead of passing a specific user folder,\n you pass the portal (e.g. as obtained via the ``portal`` layer resource).\n \n@@ -432,7 +432,7 @@ User management\n \n ``logout()``\n Simulate logging out, i.e. becoming the anonymous user. This is equivalent\n- to the ``z2.logout()`` helper in `plone.testing`_.\n+ to the ``zope.logout()`` helper in `plone.testing`_.\n \n For example::\n \n@@ -668,7 +668,7 @@ following methods:\n This is called during setup. ``app`` is the Zope application root.\n ``configurationContext`` is a newly stacked ZCML configuration context.\n Use this to load ZCML, install products using the helper\n- ``plone.testing.z2.installProduct()``, or manipulate other global state.\n+ ``plone.testing.zope.installProduct()``, or manipulate other global state.\n \n ``setUpPloneSite(self, portal)``\n This is called during setup. ``portal`` is the Plone site root as\n@@ -709,7 +709,7 @@ the package, i.e. ``my.product.testing``::\n from plone.app.testing import PLONE_FIXTURE\n from plone.app.testing import IntegrationTesting\n \n- from plone.testing import z2\n+ from plone.testing import zope\n \n class MyProduct(PloneSandboxLayer):\n \n@@ -721,7 +721,7 @@ the package, i.e. ``my.product.testing``::\n self.loadZCML(package=my.product)\n \n # Install product and call its initialize() function\n- z2.installProduct(app, \'my.product\')\n+ zope.installProduct(app, \'my.product\')\n \n # Note: you can skip this if my.product is not a Zope 2-style\n # product, i.e. it is not in the Products.* namespace and it\n@@ -734,7 +734,7 @@ the package, i.e. ``my.product.testing``::\n \n def tearDownZope(self, app):\n # Uninstall product\n- z2.uninstallProduct(app, \'my.product\')\n+ zope.uninstallProduct(app, \'my.product\')\n \n # Note: Again, you can skip this if my.product is not a Zope 2-\n # style product\n@@ -1356,7 +1356,7 @@ case, you need to commit the transaction before it becomes available, e.g.::\n \n To obtain a new test browser client::\n \n- from plone.testing.z2 import Browser\n+ from plone.testing.zope import Browser\n \n # This is usually self.app (Zope root) or site.portal (test Plone site root)\n browser = Browser(app)\n@@ -1541,7 +1541,7 @@ differences to bear in mind.\n ``FunctionalTesting`` test lifecycle layer (see example above), and then\n use::\n \n- from plone.testing.z2 import Browser\n+ from plone.testing.zope import Browser\n browser = Browser(self.layer[\'app\'])\n \n Also note that if you have made changes to the fixture prior to calling\ndiff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/setup.py b/setup.py\nindex 01506be..31cc929 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -79,7 +79,7 @@\n "plone.dexterity",\n "plone.memoize",\n "plone.registry",\n- "plone.testing [zca,security,zodb,z2]",\n+ "plone.testing [zca,security,zodb]",\n "setuptools",\n "zope.configuration",\n "zope.component",\ndiff --git a/src/plone/app/testing/helpers.py b/src/plone/app/testing/helpers.py\nindex 3d0760f..11de2ee 100644\n--- a/src/plone/app/testing/helpers.py\n+++ b/src/plone/app/testing/helpers.py\n@@ -233,7 +233,7 @@ def ploneSite(db=None, connection=None, environ=None, flavour=zope):\n ...\n \n This is based on the ``zope.zopeApp()`` context manager. See the module\n- ``plone.testing.z2`` for details.\n+ ``plone.testing.zope`` for details.\n \n Do not use this in a test. Use the \'portal\' resource from the PloneFixture\n layer instead!\n@@ -242,7 +242,7 @@ def ploneSite(db=None, connection=None, environ=None, flavour=zope):\n pass an open connection as ``connection`` (the connection will not be\n closed).\n \n- flavour ... either `plone.testing.z2` resp. `plone.testing.zope` for WSGI\n+ flavour ... either `plone.testing.zope` for WSGI\n or `plone.testing.zserver` for ZServer\n """\n setHooks()\ndiff --git a/src/plone/app/testing/layers.py b/src/plone/app/testing/layers.py\nindex 6b787c3..0489529 100644\n--- a/src/plone/app/testing/layers.py\n+++ b/src/plone/app/testing/layers.py\n@@ -278,7 +278,7 @@ class PloneTestLifecycle:\n resource and resets the environment between each test.\n \n This class is used as a mixing for the IntegrationTesting and\n- FunctionalTesting classes below, which also mix in the z2 versions of\n+ FunctionalTesting classes below, which also mix in the zope versions of\n the same.\n """\n \ndiff --git a/src/plone/app/testing/selenium.rst b/src/plone/app/testing/selenium.rst\nindex f03719a..4310a85 100644\n--- a/src/plone/app/testing/selenium.rst\n+++ b/src/plone/app/testing/selenium.rst\n@@ -63,8 +63,8 @@ shown above, and ``PLONE_FIXTURE``.\n >>> runner.setup_layer(\n ... options, layers.SELENIUM_PLONE_FUNCTIONAL_TESTING, setupLayers)\n Set up plone.testing.zca.LayerCleanup in ... seconds.\n- Set up plone.testing.z2.Startup in ... seconds.\n- Set up plone.testing.z2.ZServer in ... seconds.\n+ Set up plone.testing.zope.Startup in ... seconds.\n+ Set up plone.testing.zope.WSGIServer in ... seconds.\n Set up plone.app.testing.selenium_layers.SeleniumLayer in ... seconds.\n Set up plone.app.testing.layers.PloneFixture in ... seconds.\n Set up plone.app.testing.selenium_layers.SeleniumTesting:Functional in ... seconds.\n@@ -84,9 +84,9 @@ indicate where Zope is running.\n Let\'s now simulate a test. Test setup does nothing beyond what the base layers\n do.\n \n- >>> from plone.testing import z2, zca\n+ >>> from plone.testing import zope, zca\n >>> zca.LAYER_CLEANUP.testSetUp()\n- >>> z2.STARTUP.testSetUp()\n+ >>> zope.STARTUP.testSetUp()\n >>> layers.SELENIUM_FIXTURE.testSetUp()\n >>> layers.SELENIUM_PLONE_FUNCTIONAL_TESTING.testSetUp()\n \n@@ -120,7 +120,7 @@ Test tear-down does nothing beyond what the base layers do.\n \n >>> layers.SELENIUM_PLONE_FUNCTIONAL_TESTING.testTearDown()\n >>> layers.SELENIUM_FIXTURE.testTearDown()\n- >>> z2.STARTUP.testTearDown()\n+ >>> zope.STARTUP.testTearDown()\n >>> zca.LAYER_CLEANUP.testTearDown()\n \n >>> \'portal\' in layers.SELENIUM_PLONE_FUNCTIONAL_TESTING\n@@ -137,7 +137,7 @@ When the layer is torn down, the Selenium browser is closed.\n >>> runner.tear_down_unneeded(options, [], setupLayers)\n Tear down plone.app.testing.selenium_layers.SeleniumTesting:Functional in ... seconds.\n Tear down plone.app.testing.layers.PloneFixture in ... seconds.\n- Tear down plone.testing.z2.Startup in ... seconds.\n+ Tear down plone.testing.zope.Startup in ... seconds.\n Tear down plone.testing.zca.LayerCleanup in ... seconds.\n \n >>> if getattr(selenium, \'_server\', None) is None:\ndiff --git a/src/plone/app/testing/selenium_layers.py b/src/plone/app/testing/selenium_layers.py\nindex f4e0905..4452e3c 100644\n--- a/src/plone/app/testing/selenium_layers.py\n+++ b/src/plone/app/testing/selenium_layers.py\n@@ -10,7 +10,7 @@\n \n \n class SeleniumLayer(Layer):\n- defaultBases = (zope.ZSERVER_FIXTURE,)\n+ defaultBases = (zope.WSGI_SERVER_FIXTURE,)\n \n def testSetUp(self):\n # Start up Selenium\n' -Repository: plone.app.users +Repository: plone.app.testing Branch: refs/heads/master -Date: 2025-01-21T15:46:38+01:00 +Date: 2025-01-21T15:48:03+01:00 Author: Gil Forcada Codinachs (gforcada) -Commit: https://github.com/plone/plone.app.users/commit/1d0108f2a50458366ff2f00d4bfa51100a451f38 +Commit: https://github.com/plone/plone.app.testing/commit/f8ae59cb9e625918a3995669c492bc1bb5a09937 -Merge pull request #134 from plone/maurits-warnings +Merge pull request #104 from plone/maurits-warnings Fix DeprecationWarnings. Files changed: A news/4090.bugfix -M plone/app/users/browser/account.py -M plone/app/users/browser/configure.zcml -M plone/app/users/testing.py -M plone/app/users/tests/base.py -M plone/app/users/tests/duplicate_email.rst -M plone/app/users/tests/email_login.rst -M plone/app/users/tests/flexible_user_registration.rst -M plone/app/users/tests/forms_navigationroot.rst -M plone/app/users/tests/member_search.rst -M plone/app/users/tests/password.rst -M plone/app/users/tests/personal_preferences.rst -M plone/app/users/tests/personal_preferences_prefs_user_details.rst -M plone/app/users/tests/registration_forms.rst -M plone/app/users/tests/test_account.py -M plone/app/users/tests/test_pam.py -M plone/app/users/tests/test_schema_types.py -M plone/app/users/tests/userdata.rst -M plone/app/users/tests/userdata_prefs_user_details.rst +M docs/README.rst M setup.py +M src/plone/app/testing/helpers.py +M src/plone/app/testing/layers.py +M src/plone/app/testing/selenium.rst +M src/plone/app/testing/selenium_layers.py -b'diff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/plone/app/users/browser/account.py b/plone/app/users/browser/account.py\nindex b9aa9fd..05ccc76 100644\n--- a/plone/app/users/browser/account.py\n+++ b/plone/app/users/browser/account.py\n@@ -2,12 +2,12 @@\n from Acquisition import aq_inner\n from PIL import Image\n from PIL import UnidentifiedImageError\n-from plone.app.layout.navigation.interfaces import INavigationRoot\n from plone.app.users.browser.interfaces import IAccountPanelForm\n from plone.app.users.browser.schemaeditor import getFromBaseSchema\n from plone.app.users.utils import notifyWidgetActionExecutionError\n from plone.autoform.form import AutoExtensibleForm\n from plone.base import PloneMessageFactory as _\n+from plone.base.interfaces import INavigationRoot\n from plone.base.interfaces import IPloneSiteRoot\n from plone.base.interfaces import ISecuritySchema\n from plone.base.utils import safe_text\ndiff --git a/plone/app/users/browser/configure.zcml b/plone/app/users/browser/configure.zcml\nindex 63d6592..2e8677d 100644\n--- a/plone/app/users/browser/configure.zcml\n+++ b/plone/app/users/browser/configure.zcml\n@@ -13,14 +13,14 @@\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n@@ -93,13 +93,13 @@\n \n \n \n \n >> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n >>> browser = Browser(layer[\'app\'])\n >>> browser.open(\'http://nohost/plone/\')\n >>> browser.getLink(\'Log in\').click()\ndiff --git a/plone/app/users/tests/email_login.rst b/plone/app/users/tests/email_login.rst\nindex 70d314d..2d6d97b 100644\n--- a/plone/app/users/tests/email_login.rst\n+++ b/plone/app/users/tests/email_login.rst\n@@ -8,7 +8,7 @@ Set up\n >>> from plone.app.testing import SITE_OWNER_NAME\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/flexible_user_registration.rst b/plone/app/users/tests/flexible_user_registration.rst\nindex a3fae15..e533195 100644\n--- a/plone/app/users/tests/flexible_user_registration.rst\n+++ b/plone/app/users/tests/flexible_user_registration.rst\n@@ -2,7 +2,7 @@\n Testing the flexible user registration\n ======================================\n \n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n >>> import transaction\n >>> app = layer[\'app\']\ndiff --git a/plone/app/users/tests/forms_navigationroot.rst b/plone/app/users/tests/forms_navigationroot.rst\nindex 35de379..3038a52 100644\n--- a/plone/app/users/tests/forms_navigationroot.rst\n+++ b/plone/app/users/tests/forms_navigationroot.rst\n@@ -9,10 +9,10 @@ Set up\n ======\n \n >>> from Products.Five.utilities.marker import mark\n- >>> from plone.app.layout.navigation.interfaces import INavigationRoot\n+ >>> from plone.base.interfaces import INavigationRoot\n >>> from plone.app.testing import SITE_OWNER_NAME\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/member_search.rst b/plone/app/users/tests/member_search.rst\nindex eeb4743..92a21d0 100644\n--- a/plone/app/users/tests/member_search.rst\n+++ b/plone/app/users/tests/member_search.rst\n@@ -12,7 +12,7 @@ Set up\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/password.rst b/plone/app/users/tests/password.rst\nindex 510983e..8224669 100644\n--- a/plone/app/users/tests/password.rst\n+++ b/plone/app/users/tests/password.rst\n@@ -9,7 +9,7 @@ Set up\n \n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/personal_preferences.rst b/plone/app/users/tests/personal_preferences.rst\nindex b0d3fe0..c728ec6 100644\n--- a/plone/app/users/tests/personal_preferences.rst\n+++ b/plone/app/users/tests/personal_preferences.rst\n@@ -8,7 +8,7 @@ Set up\n \n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/personal_preferences_prefs_user_details.rst b/plone/app/users/tests/personal_preferences_prefs_user_details.rst\nindex 4b3745d..460eb73 100644\n--- a/plone/app/users/tests/personal_preferences_prefs_user_details.rst\n+++ b/plone/app/users/tests/personal_preferences_prefs_user_details.rst\n@@ -6,7 +6,7 @@ Set up\n \n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> app = layer[\'app\']\n >>> portal = layer[\'portal\']\ndiff --git a/plone/app/users/tests/registration_forms.rst b/plone/app/users/tests/registration_forms.rst\nindex e891896..97b209c 100644\n--- a/plone/app/users/tests/registration_forms.rst\n+++ b/plone/app/users/tests/registration_forms.rst\n@@ -12,7 +12,7 @@ Testing the flexible user registration\n \n >>> import transaction\n >>> transaction.commit()\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n >>> browser = Browser(layer[\'app\'])\n >>> browser.open(\'http://nohost/plone\')\n >>> list_widget_suffix = \':list\'\ndiff --git a/plone/app/users/tests/test_account.py b/plone/app/users/tests/test_account.py\nindex 084d121..a71aec9 100644\n--- a/plone/app/users/tests/test_account.py\n+++ b/plone/app/users/tests/test_account.py\n@@ -1,5 +1,5 @@\n from plone.app.users.browser.account import AccountPanelSchemaAdapter\n-from plone.testing import z2\n+from plone.testing import zope\n from Products.CMFCore.interfaces import IMembershipTool\n from zope.component import provideUtility\n from zope.interface import implementer\n@@ -23,7 +23,7 @@ def checkPermission(self, permission, context):\n \n \n class TestAccountPanelSchemaAdapter(unittest.TestCase):\n- layer = z2.INTEGRATION_TESTING\n+ layer = zope.INTEGRATION_TESTING\n \n def test__init__no_userid(self):\n """Should edit current user."""\ndiff --git a/plone/app/users/tests/test_pam.py b/plone/app/users/tests/test_pam.py\nindex 5e4a94b..70dd736 100644\n--- a/plone/app/users/tests/test_pam.py\n+++ b/plone/app/users/tests/test_pam.py\n@@ -7,7 +7,7 @@\n from plone.app.testing import TEST_USER_NAME\n from plone.app.testing import TEST_USER_PASSWORD\n from plone.app.testing.layers import FunctionalTesting\n-from plone.testing import z2\n+from plone.testing import zope\n from Products.CMFCore.utils import getToolByName\n \n import unittest\n@@ -36,7 +36,7 @@ class TestUserDataPanelWithPAM(unittest.TestCase):\n layer = WITHPAM_FUNCTIONAL_TESTING\n \n def test_pam(self):\n- browser = z2.Browser(self.layer["app"])\n+ browser = zope.Browser(self.layer["app"])\n browser.addHeader(\n "Authorization", f"Basic {TEST_USER_NAME}:{TEST_USER_PASSWORD}"\n )\ndiff --git a/plone/app/users/tests/test_schema_types.py b/plone/app/users/tests/test_schema_types.py\nindex d943cdf..9783a69 100644\n--- a/plone/app/users/tests/test_schema_types.py\n+++ b/plone/app/users/tests/test_schema_types.py\n@@ -6,7 +6,7 @@\n from plone.app.testing import TEST_USER_PASSWORD\n from plone.app.users.setuphandlers import import_schema\n from plone.app.users.tests.base import BaseTestCase\n-from plone.testing.z2 import Browser\n+from plone.testing.zope import Browser\n from Products.GenericSetup.tests.common import DummyImportContext\n \n import transaction\ndiff --git a/plone/app/users/tests/userdata.rst b/plone/app/users/tests/userdata.rst\nindex 2449697..f9fe604 100644\n--- a/plone/app/users/tests/userdata.rst\n+++ b/plone/app/users/tests/userdata.rst\n@@ -8,7 +8,7 @@ Set Up\n >>> from plone.app.testing import TEST_USER_ID\n >>> from plone.app.testing import TEST_USER_NAME\n >>> from plone.app.testing import TEST_USER_PASSWORD\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> import transaction\n \ndiff --git a/plone/app/users/tests/userdata_prefs_user_details.rst b/plone/app/users/tests/userdata_prefs_user_details.rst\nindex dcc7e45..90606da 100644\n--- a/plone/app/users/tests/userdata_prefs_user_details.rst\n+++ b/plone/app/users/tests/userdata_prefs_user_details.rst\n@@ -7,7 +7,7 @@ Set Up\n >>> from plone.app.testing import SITE_OWNER_PASSWORD\n >>> from plone.app.testing import TEST_USER_ID\n >>> from plone.app.testing import TEST_USER_NAME\n- >>> from plone.testing.z2 import Browser\n+ >>> from plone.testing.zope import Browser\n \n >>> import transaction\n \ndiff --git a/setup.py b/setup.py\nindex 12ad8f9..51ece33 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -64,7 +64,6 @@\n "Products.PlonePAS >= 5.0.1",\n "Products.statusmessages",\n "Zope",\n- "plone.app.layout",\n "plone.autoform >= 1.2",\n "plone.app.event",\n "plone.app.vocabularies",\n' +b'diff --git a/docs/README.rst b/docs/README.rst\nindex 02f29ed..2ec49ca 100644\n--- a/docs/README.rst\n+++ b/docs/README.rst\n@@ -47,7 +47,7 @@ In ``setup.py``, add or modify the ``extras_require`` option, like so::\n ]\n },\n \n-This will also include ``plone.testing``, with the ``[z2]``, ``[zca]`` and\n+This will also include ``plone.testing``, with the ``[security]``, ``[zca]`` and\n ``[zodb]`` extras (which ``plone.app.testing`` itself relies on).\n \n Please see the `plone.testing`_ documentation for more details about how to\n@@ -131,12 +131,12 @@ Plone site fixture\n +------------+--------------------------------------------------+\n | Class: | ``plone.app.testing.layers.PloneFixture`` |\n +------------+--------------------------------------------------+\n-| Bases: | ``plone.testing.z2.STARTUP`` |\n+| Bases: | ``plone.testing.zope.STARTUP`` |\n +------------+--------------------------------------------------+\n | Resources: | |\n +------------+--------------------------------------------------+\n \n-This layer sets up the Plone site fixture on top of the ``z2.STARTUP``\n+This layer sets up the Plone site fixture on top of the ``zope.STARTUP``\n fixture.\n \n You should not use this layer directly, as it does not provide any test\n@@ -212,7 +212,7 @@ Integration and functional testing test lifecycles\n \n ``plone.app.testing`` comes with two layer classes, ``IntegrationTesting``\n and ``FunctionalTesting``, which derive from the corresponding layer classes\n-in ``plone.testing.z2``.\n+in ``plone.testing.zope``.\n \n These classes set up the ``app``, ``request`` and ``portal`` resources, and\n reset the fixture (including various global caches) between each test run.\n@@ -299,7 +299,7 @@ Plone ZServer\n +------------+--------------------------------------------------+\n | Layer: | ``plone.app.testing.PLONE_ZSERVER`` |\n +------------+--------------------------------------------------+\n-| Class: | ``plone.testing.z2.ZServer`` |\n+| Class: | ``plone.testing.zope.ZServer`` |\n +------------+--------------------------------------------------+\n | Bases: | ``plone.app.testing.PLONE_FUNCTIONAL_TESTING`` |\n +------------+--------------------------------------------------+\n@@ -313,7 +313,7 @@ Again, you would not normally extend this layer. To create a custom layer\n that has a running ZServer, you can use the same pattern as this one, e.g.::\n \n from plone.testing import Layer\n- from plone.testing import z2\n+ from plone.testing import zserver\n from plone.app.testing import PLONE_FIXTURE\n from plone.app.testing import FunctionalTesting\n \n@@ -323,9 +323,9 @@ that has a running ZServer, you can use the same pattern as this one, e.g.::\n ...\n \n MY_FIXTURE = MyFixture()\n- MY_ZSERVER = FunctionalTesting(bases=(MY_FIXTURE, z2.ZSERVER_FIXTURE), name=\'MyFixture:ZServer\')\n+ MY_ZSERVER = FunctionalTesting(bases=(MY_FIXTURE, zserver.ZSERVER_FIXTURE), name=\'MyFixture:ZServer\')\n \n-See the description of the ``z2.ZSERVER`` layer in `plone.testing`_\n+See the description of the ``zserver.ZSERVER`` layer in `plone.testing`_\n for further details.\n \n Plone FTP server\n@@ -337,7 +337,7 @@ Plone FTP server\n | Class: | ``plone.app.testing.layers.FunctionalTesting`` |\n +------------+--------------------------------------------------+\n | Bases: | ``plone.app.testing.PLONE_FIXTURE`` |\n-| | ``plone.testing.z2.ZSERVER_FIXTURE`` |\n+| | ``plone.testing.zserver.ZSERVER_FIXTURE`` |\n +------------+--------------------------------------------------+\n | Resources: | ``portal`` (test setup only) |\n +------------+--------------------------------------------------+\n@@ -346,7 +346,7 @@ This is layer is intended for functional testing using a live FTP server.\n \n It is semantically equivalent to the ``PLONE_ZSERVER`` layer.\n \n-See the description of the ``z2.FTP_SERVER`` layer in `plone.testing`_\n+See the description of the ``zserver.FTP_SERVER`` layer in `plone.testing`_\n for further details.\n \n Helper functions\n@@ -406,7 +406,7 @@ User management\n ---------------\n \n ``login(portal, userName)``\n- Simulate login as the given user. This is based on the ``z2.login()``\n+ Simulate login as the given user. This is based on the ``zope.login()``\n helper in `plone.testing`_, but instead of passing a specific user folder,\n you pass the portal (e.g. as obtained via the ``portal`` layer resource).\n \n@@ -432,7 +432,7 @@ User management\n \n ``logout()``\n Simulate logging out, i.e. becoming the anonymous user. This is equivalent\n- to the ``z2.logout()`` helper in `plone.testing`_.\n+ to the ``zope.logout()`` helper in `plone.testing`_.\n \n For example::\n \n@@ -668,7 +668,7 @@ following methods:\n This is called during setup. ``app`` is the Zope application root.\n ``configurationContext`` is a newly stacked ZCML configuration context.\n Use this to load ZCML, install products using the helper\n- ``plone.testing.z2.installProduct()``, or manipulate other global state.\n+ ``plone.testing.zope.installProduct()``, or manipulate other global state.\n \n ``setUpPloneSite(self, portal)``\n This is called during setup. ``portal`` is the Plone site root as\n@@ -709,7 +709,7 @@ the package, i.e. ``my.product.testing``::\n from plone.app.testing import PLONE_FIXTURE\n from plone.app.testing import IntegrationTesting\n \n- from plone.testing import z2\n+ from plone.testing import zope\n \n class MyProduct(PloneSandboxLayer):\n \n@@ -721,7 +721,7 @@ the package, i.e. ``my.product.testing``::\n self.loadZCML(package=my.product)\n \n # Install product and call its initialize() function\n- z2.installProduct(app, \'my.product\')\n+ zope.installProduct(app, \'my.product\')\n \n # Note: you can skip this if my.product is not a Zope 2-style\n # product, i.e. it is not in the Products.* namespace and it\n@@ -734,7 +734,7 @@ the package, i.e. ``my.product.testing``::\n \n def tearDownZope(self, app):\n # Uninstall product\n- z2.uninstallProduct(app, \'my.product\')\n+ zope.uninstallProduct(app, \'my.product\')\n \n # Note: Again, you can skip this if my.product is not a Zope 2-\n # style product\n@@ -1356,7 +1356,7 @@ case, you need to commit the transaction before it becomes available, e.g.::\n \n To obtain a new test browser client::\n \n- from plone.testing.z2 import Browser\n+ from plone.testing.zope import Browser\n \n # This is usually self.app (Zope root) or site.portal (test Plone site root)\n browser = Browser(app)\n@@ -1541,7 +1541,7 @@ differences to bear in mind.\n ``FunctionalTesting`` test lifecycle layer (see example above), and then\n use::\n \n- from plone.testing.z2 import Browser\n+ from plone.testing.zope import Browser\n browser = Browser(self.layer[\'app\'])\n \n Also note that if you have made changes to the fixture prior to calling\ndiff --git a/news/4090.bugfix b/news/4090.bugfix\nnew file mode 100644\nindex 0000000..8528aef\n--- /dev/null\n+++ b/news/4090.bugfix\n@@ -0,0 +1 @@\n+Fix DeprecationWarnings. [maurits]\ndiff --git a/setup.py b/setup.py\nindex 01506be..31cc929 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -79,7 +79,7 @@\n "plone.dexterity",\n "plone.memoize",\n "plone.registry",\n- "plone.testing [zca,security,zodb,z2]",\n+ "plone.testing [zca,security,zodb]",\n "setuptools",\n "zope.configuration",\n "zope.component",\ndiff --git a/src/plone/app/testing/helpers.py b/src/plone/app/testing/helpers.py\nindex 3d0760f..11de2ee 100644\n--- a/src/plone/app/testing/helpers.py\n+++ b/src/plone/app/testing/helpers.py\n@@ -233,7 +233,7 @@ def ploneSite(db=None, connection=None, environ=None, flavour=zope):\n ...\n \n This is based on the ``zope.zopeApp()`` context manager. See the module\n- ``plone.testing.z2`` for details.\n+ ``plone.testing.zope`` for details.\n \n Do not use this in a test. Use the \'portal\' resource from the PloneFixture\n layer instead!\n@@ -242,7 +242,7 @@ def ploneSite(db=None, connection=None, environ=None, flavour=zope):\n pass an open connection as ``connection`` (the connection will not be\n closed).\n \n- flavour ... either `plone.testing.z2` resp. `plone.testing.zope` for WSGI\n+ flavour ... either `plone.testing.zope` for WSGI\n or `plone.testing.zserver` for ZServer\n """\n setHooks()\ndiff --git a/src/plone/app/testing/layers.py b/src/plone/app/testing/layers.py\nindex 6b787c3..0489529 100644\n--- a/src/plone/app/testing/layers.py\n+++ b/src/plone/app/testing/layers.py\n@@ -278,7 +278,7 @@ class PloneTestLifecycle:\n resource and resets the environment between each test.\n \n This class is used as a mixing for the IntegrationTesting and\n- FunctionalTesting classes below, which also mix in the z2 versions of\n+ FunctionalTesting classes below, which also mix in the zope versions of\n the same.\n """\n \ndiff --git a/src/plone/app/testing/selenium.rst b/src/plone/app/testing/selenium.rst\nindex f03719a..4310a85 100644\n--- a/src/plone/app/testing/selenium.rst\n+++ b/src/plone/app/testing/selenium.rst\n@@ -63,8 +63,8 @@ shown above, and ``PLONE_FIXTURE``.\n >>> runner.setup_layer(\n ... options, layers.SELENIUM_PLONE_FUNCTIONAL_TESTING, setupLayers)\n Set up plone.testing.zca.LayerCleanup in ... seconds.\n- Set up plone.testing.z2.Startup in ... seconds.\n- Set up plone.testing.z2.ZServer in ... seconds.\n+ Set up plone.testing.zope.Startup in ... seconds.\n+ Set up plone.testing.zope.WSGIServer in ... seconds.\n Set up plone.app.testing.selenium_layers.SeleniumLayer in ... seconds.\n Set up plone.app.testing.layers.PloneFixture in ... seconds.\n Set up plone.app.testing.selenium_layers.SeleniumTesting:Functional in ... seconds.\n@@ -84,9 +84,9 @@ indicate where Zope is running.\n Let\'s now simulate a test. Test setup does nothing beyond what the base layers\n do.\n \n- >>> from plone.testing import z2, zca\n+ >>> from plone.testing import zope, zca\n >>> zca.LAYER_CLEANUP.testSetUp()\n- >>> z2.STARTUP.testSetUp()\n+ >>> zope.STARTUP.testSetUp()\n >>> layers.SELENIUM_FIXTURE.testSetUp()\n >>> layers.SELENIUM_PLONE_FUNCTIONAL_TESTING.testSetUp()\n \n@@ -120,7 +120,7 @@ Test tear-down does nothing beyond what the base layers do.\n \n >>> layers.SELENIUM_PLONE_FUNCTIONAL_TESTING.testTearDown()\n >>> layers.SELENIUM_FIXTURE.testTearDown()\n- >>> z2.STARTUP.testTearDown()\n+ >>> zope.STARTUP.testTearDown()\n >>> zca.LAYER_CLEANUP.testTearDown()\n \n >>> \'portal\' in layers.SELENIUM_PLONE_FUNCTIONAL_TESTING\n@@ -137,7 +137,7 @@ When the layer is torn down, the Selenium browser is closed.\n >>> runner.tear_down_unneeded(options, [], setupLayers)\n Tear down plone.app.testing.selenium_layers.SeleniumTesting:Functional in ... seconds.\n Tear down plone.app.testing.layers.PloneFixture in ... seconds.\n- Tear down plone.testing.z2.Startup in ... seconds.\n+ Tear down plone.testing.zope.Startup in ... seconds.\n Tear down plone.testing.zca.LayerCleanup in ... seconds.\n \n >>> if getattr(selenium, \'_server\', None) is None:\ndiff --git a/src/plone/app/testing/selenium_layers.py b/src/plone/app/testing/selenium_layers.py\nindex f4e0905..4452e3c 100644\n--- a/src/plone/app/testing/selenium_layers.py\n+++ b/src/plone/app/testing/selenium_layers.py\n@@ -10,7 +10,7 @@\n \n \n class SeleniumLayer(Layer):\n- defaultBases = (zope.ZSERVER_FIXTURE,)\n+ defaultBases = (zope.WSGI_SERVER_FIXTURE,)\n \n def testSetUp(self):\n # Start up Selenium\n'