#NEWLINE# def test_dump_response_data_with_older_http_version( self ) : #NEWLINE# #INDENT# 'Build up the response data into a bytearray.' #NEWLINE# self . configure_response ( url = 'https://example.com/redirected' , content = b'foobarbogus' , reason = b'OK' ) #NEWLINE# self . configure_httpresponse ( headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/json' , #NEWLINE# #UNINDENT# } , reason = b'OK' , status = 201 , version = HTTP_0_9 ) #NEWLINE# array = bytearray ( ) #NEWLINE# prefixes = dump . PrefixSettings ( 'request:' , 'response:' ) #NEWLINE# dump . _dump_response_data ( response = self . response , prefixes = prefixes , bytearr = array ) #NEWLINE# assert ( b'response:HTTP/0.9 201 OK\r\n' in self ) #NEWLINE# assert ( b'response:Content-Type: application/json\r\n' in array )