Ejemplo n.º 1
0
 def test_or_exprs(self):
   self.assertRaises(ValueError, sql_builder.OrExprs, 7)
   self._check_build_where_sql(
       sql_builder.OrExprs(sql_builder.Between(11, 20), 30),
       '((col_a BETWEEN %(col_a_3)s AND %(col_a_4)s) OR '
       '(col_a = %(col_a_5)s))',
       dict(col_a_3=11, col_a_4=20, col_a_5=30))
Ejemplo n.º 2
0
 def test_between(self):
   self._check_build_where_sql(
       sql_builder.Between(11, 20),
       'col_a BETWEEN %(col_a_3)s AND %(col_a_4)s',
       dict(col_a_3=11, col_a_4=20))