From: jlaine Date: Mon, 24 May 2010 10:08:39 +0000 (+0000) Subject: test escaping X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=95cf63e98a4ae8023e565be5f9ba1374f58bd3e9;p=matthijs%2Fupstream%2Fdjango-ldapdb.git test escaping git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@871 e071eeec-0327-468d-9b6a-08194a12b294 --- 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)