#NEWLINE# @ mock . patch . object ( PoolPublisher , 'publish' , mock . MagicMock ( ) ) #NEWLINE# def __do_put( self , id , instance ) : #NEWLINE# #INDENT# return self . app . put_json ( ( '%s/%s' % ( self . base_url , id ) ) , instance , expect_errors = True )