Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ has been applied. Some of the more common such tests are shown below.
To verify that a product has been installed (e.g. as a dependency via
``metadata.xml``)::

from Products.CMFPlone.utils import get_installer
from plone.base.utils import get_installer

qi = get_installer(portal)
self.assertTrue(qi.is_product_installed('my.product'))
Expand Down
3 changes: 3 additions & 0 deletions news/+8571c2ca.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Use ``plone.base.utils`` instead of ``Products.CMFPlone.utils`` when deprecated.
No longer pass deprecated ``setup_content=False`` to ``addPloneSite`` call.
[maurits]
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"Zope",
"persistent",
"plone.app.contenttypes",
"plone.base",
"plone.dexterity",
"plone.memoize",
"plone.registry",
Expand Down
4 changes: 2 additions & 2 deletions src/plone/app/testing/bbb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from AccessControl import getSecurityManager
from plone.app import testing
from plone.base.utils import unrestricted_construct_instance
from plone.testing import zope
from Products.CMFPlone.utils import _createObjectByType
from Testing.ZopeTestCase.functional import Functional

import transaction
Expand All @@ -14,7 +14,7 @@ def _createMemberarea(portal, user_id):
mtool = portal.portal_membership
members = mtool.getMembersFolder()
if members is None:
_createObjectByType("Folder", portal, id="Members")
unrestricted_construct_instance("Folder", portal, id="Members")
if not mtool.getMemberareaCreationFlag():
mtool.setMemberareaCreationFlag()
mtool.createMemberArea(user_id)
Expand Down
2 changes: 1 addition & 1 deletion src/plone/app/testing/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def quickInstallProduct(portal, productName, reinstall=False):

zope.login(app["acl_users"], SITE_OWNER_NAME)

from Products.CMFPlone.utils import get_installer
from plone.base.utils import get_installer

qi = get_installer(portal)

Expand Down
2 changes: 1 addition & 1 deletion src/plone/app/testing/helpers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ course, if our setup had changed any other global or external state, we would
need to tear that down as well.

>>> def is_installed(portal, product_name):
... from Products.CMFPlone.utils import get_installer
... from plone.base.utils import get_installer
... qi = get_installer(portal)
... return qi.is_product_installed(product_name)

Expand Down
1 change: 0 additions & 1 deletion src/plone/app/testing/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ def setUpDefaultContent(self, app):
app,
PLONE_SITE_ID,
title=PLONE_SITE_TITLE,
setup_content=False,
default_language=DEFAULT_LANGUAGE,
extension_ids=self.extensionProfiles,
)
Expand Down