#NEWLINE# def test_chunked_response_without_crlf_on_end( self ) : #NEWLINE# #INDENT# stream = [ b'foo' , b'bar' , b'baz' ] #NEWLINE# fp = MockChunkedEncodingWithoutCRLFOnEnd ( stream ) #NEWLINE# r = httplib . HTTPResponse ( MockSock ) #NEWLINE# r . fp = fp #NEWLINE# r . chunked = True #NEWLINE# r . chunk_left = None #NEWLINE# resp = HTTPResponse ( r , preload_content = False , headers = { #NEWLINE# #INDENT# 'transfer-encoding' : 'chunked' , #NEWLINE# #UNINDENT# } ) #NEWLINE# if getattr ( self , 'assertListEqual' , False ) : #NEWLINE# #INDENT# self . assertListEqual ( stream , list ( resp . stream ( ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for ( index , item ) in enumerate ( resp . stream ( ) ) : #NEWLINE# #INDENT# v = stream [ index ] #NEWLINE# self . assertEqual ( item , v )