- where.add((Constraint("cn", "cn", CharField()), 'exact', "(test)"), AND)
- self.assertEquals(where.as_sql(), "(cn=\\28test\\29)")
+ where.add((Constraint("uid", "uid", IntegerField()), 'gte', 1), AND)
+ self.assertEquals(where.as_sql(), ("(uid>=1)", []))
+
+ where = WhereNode()
+ 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)", []))
+
+ where = WhereNode()
+ where.add((Constraint("memberUid", "memberUid", ListField()), 'contains', '(foouser)'), AND)
+ self.assertEquals(where.as_sql(), ("(memberUid=\\28foouser\\29)", []))