def test_render_check_constraint_literal(self): eq_ignore_whitespace( autogenerate._render_check_constraint( CheckConstraint("im a constraint"), self.autogen_context ), "sa.CheckConstraint('im a constraint')" )
def test_render_check_constraint_literal(self): eq_ignore_whitespace( autogenerate._render_check_constraint( CheckConstraint("im a constraint", name='cc1'), self.autogen_context ), "sa.CheckConstraint('im a constraint', name='cc1')" )
def test_render_check_constraint_sqlexpr(self): c = column('c') five = literal_column('5') ten = literal_column('10') eq_ignore_whitespace( autogenerate._render_check_constraint( CheckConstraint(and_(c > five, c < ten)), self.autogen_context), "sa.CheckConstraint('c > 5 AND c < 10')")
def test_render_check_constraint_sqlexpr(self): c = column('c') five = literal_column('5') ten = literal_column('10') eq_ignore_whitespace( autogenerate._render_check_constraint( CheckConstraint(and_(c > five, c < ten)), self.autogen_context ), "sa.CheckConstraint('c > 5 AND c < 10')" )