Commit c9701702 authored by Nicolas Delaby's avatar Nicolas Delaby

Add test for Quoted String

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19291 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 344e7842
...@@ -108,6 +108,13 @@ class TestQuery(unittest.TestCase): ...@@ -108,6 +108,13 @@ class TestQuery(unittest.TestCase):
datetime_search_keys = [], datetime_search_keys = [],
full_text_search_keys=[])) full_text_search_keys=[]))
def testQuotedString(self):
q = Query(title='Foo d\'Bar')
self.assertEquals(
dict(where_expression="title = 'Foo d''Bar'",
select_expression_list=[]),
q.asSQLExpression(keyword_search_keys=[], full_text_search_keys=[]))
def testQueryMultipleKeys(self): def testQueryMultipleKeys(self):
# using multiple keys is invalid and raises # using multiple keys is invalid and raises
# KeyError: 'Query must have only one key' # KeyError: 'Query must have only one key'
......
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