fixed setQuery for Collection test. Test still fails, but this now reveals an actual problem, as the error also happens on a real site with plone.app.collection and collective.solr installed

This commit is contained in:
Manuel Reinhardt 2013-03-28 12:09:39 +00:00
parent f339178dc2
commit ca3c35d56a
1 changed files with 3 additions and 1 deletions

View File

@ -881,7 +881,9 @@ class SolrServerTests(SolrTestCase):
self.setRoles(['Manager'])
self.folder.invokeFactory('Collection', id='news', title='some news')
news = self.folder.news
news.setQuery({'SearchableText': 'News'})
news.setQuery([{'i': 'SearchableText',
'o': 'plone.app.querystring.operation.string.contains',
'v': 'News'}])
results = news.queryCatalog()
self.assertEqual(sorted([(r.Title, r.path_string) for r in results]),
[('News', '/plone/news'), ('News', '/plone/news/aggregator')])