#NEWLINE# def test_non_decl_access( self ) : #NEWLINE# #INDENT# counter = mock . Mock ( ) #NEWLINE# class Mixin ( object ) : #NEWLINE# #INDENT# @ declared_attr #NEWLINE# def __tablename__( cls ) : #NEWLINE# #INDENT# counter ( cls ) #NEWLINE# return 'foo' #NEWLINE# #UNINDENT# #UNINDENT# class Foo ( Mixin , Base ) : #NEWLINE# #INDENT# id = Column ( Integer , primary_key = True ) #NEWLINE# @ declared_attr #NEWLINE# def x( cls ) : #NEWLINE# #INDENT# cls . __tablename__ #NEWLINE# #UNINDENT# @ declared_attr #NEWLINE# def y( cls ) : #NEWLINE# #INDENT# cls . __tablename__ #NEWLINE# #UNINDENT# #UNINDENT# eq_ ( counter . mock_calls , [ mock . call ( Foo ) ] ) #NEWLINE# eq_ ( Foo . __tablename__ , 'foo' ) #NEWLINE# eq_ ( Foo . __tablename__ , 'foo' ) #NEWLINE# eq_ ( counter . mock_calls , [ mock . call ( Foo ) , mock . call ( Foo ) , mock . call ( Foo ) ] )