[Erp5-report] r20187 - /erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Mar 28 10:41:04 CET 2008
Author: jerome
Date: Fri Mar 28 10:41:02 2008
New Revision: 20187
URL: http://svn.erp5.org?rev=20187&view=rev
Log:
update test_ignore_empty_string and test_ignore_empty_string_related_key to use
description instead of title, because title is no longer empty by default.
Modified:
erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py
Modified: erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py?rev=20187&r1=20186&r2=20187&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py (original)
+++ erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py Fri Mar 28 10:41:02 2008
@@ -2080,36 +2080,36 @@
def test_ignore_empty_string(self, quiet=quiet, run=run_all_test):
if not run: return
# ERP5Catalog ignore empty strings by default
- doc_with_title = self._makeOrganisation(title='X')
- doc_with_empty_title = self._makeOrganisation(title='')
+ doc_with_description = self._makeOrganisation(description='X')
+ doc_with_empty_description = self._makeOrganisation(description='')
ctool = self.getCatalogTool()
def searchResults(**kw):
kw['portal_type'] = 'Organisation'
return set([x.getObject() for x in ctool.searchResults(**kw)])
- # title='' is ignored
- self.assertEquals(set([doc_with_empty_title, doc_with_title]),
- searchResults(title=''))
+ # description='' is ignored
+ self.assertEquals(set([doc_with_empty_description, doc_with_description]),
+ searchResults(description=''))
# unless we exlicitly say we don't want to ignore empty strings
- self.assertEquals(set([doc_with_empty_title]),
- searchResults(ignore_empty_string=0, title=''))
+ self.assertEquals(set([doc_with_empty_description]),
+ searchResults(ignore_empty_string=0, description=''))
def test_ignore_empty_string_related_key(self):
# ERP5Catalog ignore empty strings by default, also on related keys
- region_with_empty_title = self.portal.portal_categories.region.newContent(
- portal_type='Category', title='')
- doc_with_empty_region_title = self._makeOrganisation(title='X',
- region_value=region_with_empty_title)
- doc_without_region = self._makeOrganisation(title='')
+ region_with_empty_description = self.portal.portal_categories.region.newContent(
+ portal_type='Category', description='')
+ doc_with_empty_region_description = self._makeOrganisation(
+ region_value=region_with_empty_description)
+ doc_without_region = self._makeOrganisation()
ctool = self.getCatalogTool()
def searchResults(**kw):
kw['portal_type'] = 'Organisation'
return set([x.getObject() for x in ctool.searchResults(**kw)])
- self.assertEquals(set([doc_with_empty_region_title, doc_without_region]),
- searchResults(region_title=''))
- self.assertEquals(set([doc_with_empty_region_title]),
- searchResults(ignore_empty_string=0, region_title=''))
+ self.assertEquals(set([doc_with_empty_region_description, doc_without_region]),
+ searchResults(region_description=''))
+ self.assertEquals(set([doc_with_empty_region_description]),
+ searchResults(ignore_empty_string=0, region_description=''))
def test_complex_query(self, quiet=quiet, run=run_all_test):
# Make sure that complex query works on real environment.
More information about the Erp5-report
mailing list