def test_expr_endswith(self): self.connection.execute("INSERT INTO test VALUES (30, 'blah_%!!')") self.connection.execute("INSERT INTO test VALUES (40, 'blah!!')") id = Column("id", SQLToken("test")) title = Column("title", SQLToken("test")) expr = Select(id, title.endswith(u"_%!!")) result = list(self.connection.execute(expr)) self.assertEquals(result, [(30,)])
def test_expr_endswith(self): self.connection.execute("INSERT INTO test VALUES (30, 'blah_%!!')") self.connection.execute("INSERT INTO test VALUES (40, 'blah!!')") id = Column("id", SQLToken("test")) title = Column("title", SQLToken("test")) expr = Select(id, title.endswith(u"_%!!")) result = list(self.connection.execute(expr)) self.assertEquals(result, [(30, )])