def test_and_expr(self): self.assertJson(query.and_(True), '{"and":true}') self.assertJson(query.and_(True, False, False), '{"and":[true,false,false]}') self.assertJson(query.and_([True, False, False]), '{"and":[true,false,false]}')
def test_and(self): self.assertFalse(self._q(query.and_(True, True, False))) self.assertTrue(self._q(query.and_(True, True, True))) self.assertTrue(self._q(query.and_(True))) self.assertFalse(self._q(query.and_(False))) self._assert_bad_query(query.and_())