#NEWLINE# def test_fires_finished_deferred( self ) : #NEWLINE# #INDENT# finished = Deferred ( ) #NEWLINE# protocol = _BodyBufferingProtocol ( mock . Mock ( Protocol ) , [ ] , finished ) #NEWLINE# class TestResponseDone ( Exception ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# protocol . connectionLost ( TestResponseDone ( ) ) #NEWLINE# self . failureResultOf ( finished , TestResponseDone )