[Erp5-report] r26141 - /erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 24 12:48:53 CET 2009
Author: vincent
Date: Tue Mar 24 12:48:45 2009
New Revision: 26141
URL: http://svn.erp5.org?rev=26141&view=rev
Log:
Add a test for query generation from a syntax tree containing a "not" operator.
Modified:
erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py
Modified: erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py?rev=26141&r1=26140&r2=26141&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py [utf8] (original)
+++ erp5/trunk/products/ZSQLCatalog/tests/testSQLCatalog.py [utf8] Tue Mar 24 12:48:45 2009
@@ -352,6 +352,12 @@
{'keyword': '<"=a OR =b"'})
self.catalog(ReferenceQuery(ReferenceQuery(operator='like', keyword='%"a" OR "b"%'), operator='and'),
{'keyword': '"\\"a\\" OR \\"b\\""'})
+ self.catalog(ReferenceQuery(ReferenceQuery(ReferenceQuery(operator='match', fulltext='a'),
+ ReferenceQuery(ReferenceQuery(operator='match', fulltext='b'), operator='not'), operator='or'), operator='and'),
+ {'fulltext': 'a NOT b'})
+ self.catalog(ReferenceQuery(ReferenceQuery(ReferenceQuery(operator='match', fulltext='a'),
+ ReferenceQuery(ReferenceQuery(operator='match', fulltext='b'), operator='not'), operator='and'), operator='and'),
+ {'fulltext': 'a AND NOT b'})
def test_006_testRelatedKey_with_multiple_join(self):
# The name of catalog parameter does not matter at all
More information about the Erp5-report
mailing list