#NEWLINE# def test_response_chunked( ) : #NEWLINE# #INDENT# header_lines = [ 'HTTP/1.1 200 OK' , 'Date: Thu, 22 Oct 2015 00:37:17 GMT' , 'Cache-Control: private, max-age=0' , 'Content-Type: text/html; charset=UTF-8' , 'Server: gws' , 'Transfer-Encoding: chunked' , '' ] #NEWLINE# data = 'af\r\n' #NEWLINE# data += ( ( 'A' * 175 ) + '\r\n' ) #NEWLINE# data += 'BF\r\n' #NEWLINE# data += ( ( 'B' * 191 ) + '\r\n' ) #NEWLINE# data += '0\r\n\r\n' #NEWLINE# ( rf , rl , ru , rj ) = rsp_by_lines_and_full ( header_lines , data ) #NEWLINE# def test( r ) : #NEWLINE# #INDENT# assert r . complete #NEWLINE# assert ( r . body == ( ( 'A' * 175 ) + ( 'B' * 191 ) ) ) #NEWLINE# #UNINDENT# test ( rf ) #NEWLINE# test ( rl ) #NEWLINE# test ( ru ) #NEWLINE# test ( test )