#NEWLINE# def test_update_with_joins( self ) : #NEWLINE# #INDENT# builder = self . get_builder ( ) #NEWLINE# query = 'UPDATE "users" INNER JOIN "orders" ON "users"."id" = "orders"."user_id" SET "email" = ?, "name" = ? WHERE "id" = ?' #NEWLINE# builder . get_connection ( ) . update . return_value = 1 #NEWLINE# result = builder . from_ ( 'users' ) . join ( 'orders' , 'users.id' , '=' , 'orders.user_id' ) . where ( 'id' , '=' , 1 ) . update ( email = 'foo' , name = 'bar' ) #NEWLINE# builder . get_connection ( ) . update . assert_called_with ( query , [ 'foo' , 'bar' , 1 ] ) #NEWLINE# self . assertEqual ( 1 , result )