Commit 0db51f6b authored by Vincent Pelletier's avatar Vincent Pelletier

Default key text rendering was not tested yet. This test verifies that recent fix stay correct.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27684 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 95551c0e
......@@ -430,6 +430,15 @@ class TestSQLCatalog(unittest.TestCase):
self.catalog(ReferenceQuery(ReferenceQuery(operator='match_boolean', fulltext='a+b'), operator='and'),
{'fulltext': 'a+b'})
def test_DefaultKeyTextRendering(self):
self.catalog(ReferenceQuery(ReferenceQuery(operator='like', default='a% b'), operator='and'),
{'default': 'a% b'})
self.catalog(ReferenceQuery(ReferenceQuery(operator='like', default='%a%'), operator='and'),
{'default': '%a%'})
self.catalog(ReferenceQuery(ReferenceQuery(ReferenceQuery(operator='like', default='a% b'),
ReferenceQuery(operator='like', default='a%'), operator='or'), operator='and'),
{'default': ['a% b', 'a%']})
##return catalog(title=Query(title='a', operator='not'))
#return catalog(title={'query': 'a', 'operator': 'not'})
#return catalog(title={'query': ['a', 'b'], 'operator': 'not'})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment