Skip to content

Commit

Permalink
Merge 693c2af into 8da902e
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Feb 14, 2020
2 parents 8da902e + 693c2af commit 47abe99
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 54 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Expand Up @@ -32,10 +32,6 @@ before_install:
install:
- travis_retry pip install -U setuptools==33.1.1 tox coveralls coverage

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

script:
- travis_retry tox

Expand Down
1 change: 1 addition & 0 deletions news/3021.bugfix
@@ -0,0 +1 @@
In tests, use stronger password. [maurits]
2 changes: 2 additions & 0 deletions news/436.bugfix
@@ -0,0 +1,2 @@
In tests, use stronger password.
[maurits]
2 changes: 2 additions & 0 deletions news/437.bugfix
@@ -0,0 +1,2 @@
Removed duplicate and failing inline doctest for content.find.
[maurits]
49 changes: 0 additions & 49 deletions src/plone/api/content.py
Expand Up @@ -619,55 +619,6 @@ def find(context=None, depth=None, **kwargs):
:rtype: List
:Example: :ref:`content_find_example`
Find works alike catalog(). Indexes are passing in as arguments with the
search query as the values.
Specify indexes as arguments:
>>> find(portal_type='Document')
or combinations of indexes.
>>> find(portal_type='Document', SearchableText='Team')
Differences to using the catalog directly are:
The context argument allows passing in an context object, instead
of path='/'.join(context.getPhysicalPath().
>>> find(context=context)
- or -
>>> find(context=context, portal_type='Document')
Specifing the search depth is supported using the `depth` argument.
>>> find(depth=1)
Using `depth` needs a context for it's path. If no context and no
path is passed, the portal root is used.
>>> find(context=portal, depth=1, portal_type='Document')
- or -
>>> find(depth=1, path='/plone/folder', portal_type='Document')
- or -
>>> find(depth=1, portal_type='Document')
The path can be queried directly, too:
>>> find(path={'query': '/plone/about/team', 'depth': 1})
The `object_provides` index/argument allows Interface objects as well as
identifiers. It also supports querying multiple interfaces combined with
`and` or `or`.
>>> find(object_provides=IATDocument)
- or -
>>> find(object_provides=IATDocument.__identifier__)
- or -
>>> find(object_provides={
... 'query': [IATFolder, INavigationRoot],
... 'operator': 'and',
... })
An empty resultset is returned if no valid indexes are queried.
>>> len(find())
>>> 0
"""
query = {}
query.update(**kwargs)
Expand Down
2 changes: 1 addition & 1 deletion src/plone/api/tests/test_env.py
Expand Up @@ -92,7 +92,7 @@ def setUp(self):
api.user.create(
username='boss',
email='important_person@example.com',
password='123',
password='123456',
roles=('Member', 'VIP'),
)

Expand Down

0 comments on commit 47abe99

Please sign in to comment.