#NEWLINE# def test_connectionHeaders( self ) : #NEWLINE# #INDENT# "\n        The connection control headers are added to the parser's C{connHeaders}\n        L{Headers} instance.\n        " #NEWLINE# protocol = HTTPClientParser ( Request ( b'GET' , b'/' , _boringHeaders , None ) , ( lambda rest : None ) ) #NEWLINE# protocol . makeConnection ( StringTransport ( ) ) #NEWLINE# protocol . dataReceived ( b'HTTP/1.1 200 OK\r\n' ) #NEWLINE# protocol . dataReceived ( b'Content-Length: 123\r\n' ) #NEWLINE# protocol . dataReceived ( b'Connection: close\r\n' ) #NEWLINE# protocol . dataReceived ( b'\r\n' ) #NEWLINE# self . assertEqual ( self . response . headers , Headers ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) ) #NEWLINE# self . assertEqual ( protocol . connHeaders , Headers ( { #NEWLINE# #INDENT# b'content-length' : [ b'123' ] , #NEWLINE# b'connection' : [ b'close' ] , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# self . assertEqual ( protocol . response . length , 123 )