X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fdjango-ldapdb.git;a=blobdiff_plain;f=ldapdb%2Ftests.py;h=1e328ec5ffecf6ddf947896704cf1b21986c3759;hp=be247fdbb05a06a830c4c7d3c2b3ea210b039d7d;hb=45c9e99629c4af8f559b64ee57c3527af628032c;hpb=6114ec0f3314013175cc55886f2cd6085d8ae1d0 diff --git a/ldapdb/tests.py b/ldapdb/tests.py index be247fd..1e328ec 100644 --- a/ldapdb/tests.py +++ b/ldapdb/tests.py @@ -49,6 +49,10 @@ class WhereTestCase(TestCase): where.add((Constraint("cn", "cn", None), 'in', ["foo", "bar"]), AND) self.assertEquals(where.as_sql(), "(|(cn=foo)(cn=bar))") + where = WhereNode() + where.add((Constraint("cn", "cn", None), 'contains', "test"), AND) + self.assertEquals(where.as_sql(), "(cn=*test*)") + def test_escaped(self): where = WhereNode() where.add((Constraint("cn", "cn", None), 'exact', "(test)"), AND)