Skip to content

Commit

Permalink
use plone.base
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Apr 30, 2022
1 parent b665b88 commit 3b6a390
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion plone/app/contentlisting/contentlisting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from plone.app.contentlisting.interfaces import IContentListing
from plone.app.contentlisting.interfaces import IContentListingObject
from plone.app.layout.navigation.root import getNavigationRoot
from plone.base.interfaces import INavigationSchema
from plone.i18n.normalizer.interfaces import IIDNormalizer
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.interfaces import INavigationSchema
from Products.MimetypesRegistry.MimeTypeItem import guess_icon_path
from zope.component import getUtility
from zope.component import queryUtility
Expand Down
2 changes: 1 addition & 1 deletion plone/app/contentlisting/realobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from Acquisition import aq_get
from plone.app.contentlisting.contentlisting import BaseContentListingObject
from plone.app.contentlisting.interfaces import IContentListingObject
from plone.base.utils import human_readable_size
from plone.rfc822.interfaces import IPrimaryFieldInfo
from plone.uuid.interfaces import IUUID
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.utils import human_readable_size
from zope.interface import implementer


Expand Down
5 changes: 2 additions & 3 deletions plone/app/contentlisting/tests/integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ Some types may require '/view' appended to their URLs. Currently these don't

By altering portal_properties, we can make this true for Documents

>>> import six
>>> registry = portal.portal_registry
>>> registry['plone.types_use_view_action_in_listings'] = [six.text_type(frontpage.portal_type)]
>>> registry['plone.types_use_view_action_in_listings'] = [str(frontpage.portal_type)]

>>> frontpage.appendViewAction()
'/view'
Expand Down Expand Up @@ -216,7 +215,7 @@ We can also exclude anything of a particular type using the displayed type setti
>>> from plone.registry.interfaces import IRegistry
>>> from zope.component import getUtility
>>> registry = getUtility(IRegistry)
>>> from Products.CMFPlone.interfaces import INavigationSchema
>>> from plone.base.interfaces import INavigationSchema
>>> navigation_settings = registry.forInterface(
... INavigationSchema,
... prefix='plone'
Expand Down
4 changes: 1 addition & 3 deletions plone/app/contentlisting/tests/test_integration_doctest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from plone.app.contentlisting.tests.base import (
CONTENTLISTING_FUNCTIONAL_TESTING, # NOQA: E501
)
from plone.app.contentlisting.tests.base import CONTENTLISTING_FUNCTIONAL_TESTING
from plone.testing import layered

import doctest
Expand Down
4 changes: 1 addition & 3 deletions plone/app/contentlisting/tests/test_integration_unit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from plone.app.contentlisting.interfaces import IContentListing
from plone.app.contentlisting.interfaces import IContentListingObject
from plone.app.contentlisting.tests.base import (
CONTENTLISTING_FUNCTIONAL_TESTING, # NOQA: E501
)
from plone.app.contentlisting.tests.base import CONTENTLISTING_FUNCTIONAL_TESTING
from plone.app.testing import setRoles
from plone.app.testing import TEST_USER_ID
from plone.batching.interfaces import IBatch
Expand Down

0 comments on commit 3b6a390

Please sign in to comment.