test escaping
authorjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 24 May 2010 10:08:39 +0000 (10:08 +0000)
committerjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 24 May 2010 10:08:39 +0000 (10:08 +0000)
git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@871 e071eeec-0327-468d-9b6a-08194a12b294

ldapdb/tests.py

index 6d5c8b5c29e4833d02bfbfdeaabd9ecfd00817d2..d2aba735a7e6a7c3a38639500e9a9d150169d9fd 100644 (file)
@@ -96,6 +96,10 @@ class WhereTestCase(TestCase):
         where.add((Constraint("memberUid", "memberUid", ListField()), 'contains', 'foouser'), AND)
         self.assertEquals(where.as_sql(), "(memberUid=foouser)")
 
+        where = WhereNode()
+        where.add((Constraint("memberUid", "memberUid", ListField()), 'contains', '(foouser)'), AND)
+        self.assertEquals(where.as_sql(), "(memberUid=\\28foouser\\29)")
+
     def test_and(self):
         where = WhereNode()
         where.add((Constraint("cn", "cn", CharField()), 'exact', "foo"), AND)