test list field
[matthijs/upstream/django-ldapdb.git] / ldapdb / tests.py
index f9c4b1674a3df4a74143d75268d79b19fd3d76a3..6d5c8b5c29e4833d02bfbfdeaabd9ecfd00817d2 100644 (file)
@@ -91,6 +91,11 @@ class WhereTestCase(TestCase):
         where.add((Constraint("uid", "uid", IntegerField()), 'lte', 1), AND)
         self.assertEquals(where.as_sql(), "(uid<=1)")
 
+    def test_list_field_contains(self):
+        where = WhereNode()
+        where.add((Constraint("memberUid", "memberUid", ListField()), 'contains', 'foouser'), AND)
+        self.assertEquals(where.as_sql(), "(memberUid=foouser)")
+
     def test_and(self):
         where = WhereNode()
         where.add((Constraint("cn", "cn", CharField()), 'exact', "foo"), AND)