From 95cf63e98a4ae8023e565be5f9ba1374f58bd3e9 Mon Sep 17 00:00:00 2001 From: jlaine Date: Mon, 24 May 2010 10:08:39 +0000 Subject: [PATCH] test escaping git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@871 e071eeec-0327-468d-9b6a-08194a12b294 --- ldapdb/tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ldapdb/tests.py b/ldapdb/tests.py index 6d5c8b5..d2aba73 100644 --- a/ldapdb/tests.py +++ b/ldapdb/tests.py @@ -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) -- 2.30.2