#NEWLINE# def test_headerdict( self ) : #NEWLINE# #INDENT# default_headers = HTTPHeaderDict ( a = 'b' ) #NEWLINE# proxy_headers = HTTPHeaderDict ( ) #NEWLINE# proxy_headers . add ( 'foo' , 'bar' ) #NEWLINE# http = proxy_from_url ( self . proxy_url , headers = default_headers , proxy_headers = proxy_headers ) #NEWLINE# request_headers = HTTPHeaderDict ( baz = 'quux' ) #NEWLINE# r = http . request ( 'GET' , ( '%s/headers' % self . http_url ) , headers = request_headers ) #NEWLINE# returned_headers = json . loads ( r . data . decode ( ) ) #NEWLINE# self . assertEqual ( returned_headers . get ( 'Foo' ) , 'bar' ) #NEWLINE# self . assertEqual ( returned_headers . get ( 'Baz' ) , 'quux' )