

def test_update_to_expression(self):
    "test update from an expression.\n\n        this logic is triggered currently by a left side that doesn't\n        have a key.  The current supported use case is updating the index\n        of a Postgresql ARRAY type.\n\n        "
    table1 = self.tables.mytable
    expr = func.foo(table1.c.myid)
    eq_(expr.key, None)
    self.assert_compile(table1.update().values({
        expr: 'bar',
    }), 'UPDATE mytable SET foo(myid)=:param_1')

dataset/ETHPy150Open zzzeek/sqlalchemy/test/sql/test_update.py UpdateTest.test_update_to_expression/original