+ where = WhereNode()
+ where.add((Constraint("cn", "cn", CharField()), 'contains', "test"), AND)
+ self.assertEquals(where.as_sql(), "(cn=*test*)")
+
+ def test_integer_field(self):
+ where = WhereNode()
+ where.add((Constraint("uid", "uid", CharField()), 'exact', 1), AND)
+ self.assertEquals(where.as_sql(), "(uid=1)")
+