#NEWLINE# def test_with_partial_attribute( self ) : #NEWLINE# #INDENT# def f( x , suffix ) : #NEWLINE# #INDENT# return '{0}-{1}' . format ( x . value , suffix ) #NEWLINE# #UNINDENT# obj = Mock ( ) #NEWLINE# obj . value = 42 #NEWLINE# p = partial ( f , suffix = 'whatever' ) #NEWLINE# field = fields . Raw ( attribute = p ) #NEWLINE# assert_equal ( field . output ( 'foo' , obj ) , '42-whatever' )