test "in" operation
authorjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Wed, 19 May 2010 08:05:08 +0000 (08:05 +0000)
committerjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Wed, 19 May 2010 08:05:08 +0000 (08:05 +0000)
git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@846 e071eeec-0327-468d-9b6a-08194a12b294

ldapdb/tests.py

index 806c764b95dd56a6fe545ba1dfeb33261a993d36..d64ff4625a354ee00796591174db70cdb27b1ea9 100644 (file)
@@ -37,6 +37,10 @@ class WhereTestCase(TestCase):
         where.add((Constraint("cn", "cn", None), 'endswith', "test"), AND)
         self.assertEquals(where.as_sql(), "(cn=*test)")
 
+        where = WhereNode()
+        where.add((Constraint("cn", "cn", None), 'in', ["foo", "bar"]), AND)
+        self.assertEquals(where.as_sql(), "(|(cn=foo)(cn=bar))")
+
     def test_and(self):
         where = WhereNode()
         where.add((Constraint("cn", "cn", None), 'exact', "foo"), AND)