Skip to content

Commit

Permalink
added test for new case + updated CHANGES
Browse files Browse the repository at this point in the history
  • Loading branch information
eikichi18 committed Jul 20, 2018
1 parent 960b24a commit e755348
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
11 changes: 2 additions & 9 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@ Changelog
1.4.9 (unreleased)
------------------

Breaking changes:

- *add item here*

New features:

- *add item here*

Bug fixes:

- *add item here*
- Fix a case, where objects id starts with roots id
[eikichi18]


1.4.8 (2018-02-05)
Expand Down
11 changes: 11 additions & 0 deletions plone/app/querystring/tests/testQueryParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,3 +610,14 @@ def test__relativePath(self):
def test_getPathByUID(self):
actual = queryparser.getPathByUID(MockSite(), '00000000000000001')
self.assertEqual(actual, '/site/foo')

def test_objStartWithSiteId(self):
data = Row(
index='path',
operator='_path',
values='/{0}-news/'.format(MOCK_SITE_ID)
)
parsed = queryparser._absolutePath(MockSite(), data)
expected = {'path': {'query': ['/{0}/{1}-news/'.format(MOCK_SITE_ID, MOCK_SITE_ID)]}}
self.assertEqual(parsed, expected)

0 comments on commit e755348

Please sign in to comment.