#NEWLINE# def test_wraps_protocol( self ) : #NEWLINE# #INDENT# wrappers = [ ] #NEWLINE# wrapped = mock . Mock ( Protocol ) #NEWLINE# response = mock . Mock ( deliverBody = mock . Mock ( wraps = wrappers . append ) ) #NEWLINE# br = _BufferedResponse ( response ) #NEWLINE# br . deliverBody ( wrapped ) #NEWLINE# response . deliverBody . assert_called_once_with ( wrapped [ 0 ] ) #NEWLINE# self . assertNotEqual ( wrapped , wrappers [ 0 ] )