def test_or(self): a = Attribute("a") b = Attribute("b") expr = (a.like("%.csv")) | (b < 1024) self.assertEqual(expr.compile(), "a like '%.csv' or b<'1024'")
def test_like(self): a = Attribute("a") self.assertEqual(a.like(r"%.txt").compile(), "a like '%.txt'")