#NEWLINE# def test_declarative_column_mapped( self ) : #NEWLINE# #INDENT# 'test that uncompiled attribute usage works with\n        column_mapped_collection' #NEWLINE# from sqlalchemy.ext.declarative import declarative_base #NEWLINE# BaseObject = declarative_base ( ) #NEWLINE# class Foo ( BaseObject ) : #NEWLINE# #INDENT# __tablename__ = 'foo' #NEWLINE# id = Column ( Integer ( ) , primary_key = True ) #NEWLINE# bar_id = Column ( Integer , ForeignKey ( 'bar.id' ) ) #NEWLINE# #UNINDENT# for ( spec , obj , expected ) in ( ( Foo . id , Foo ( id = 3 ) , 3 ) , ( ( Foo . id , Foo . bar_id ) , Foo ( id = 3 , bar_id = 12 ) , ( 3 , 12 ) ) ) : #NEWLINE# #INDENT# eq_ ( collections . column_mapped_collection ( spec ) ( ) . keyfunc ( obj ) , BaseObject )