#NEWLINE# def test_receiveSimplestResponse( self ) : #NEWLINE# #INDENT# '\n        When a response is delivered to L{HTTP11ClientProtocol}, the\n        L{Deferred} previously returned by the C{request} method is called back\n        with a L{Response} instance and the connection is closed.\n        ' #NEWLINE# d = self . protocol . request ( Request ( b'GET' , b'/' , _boringHeaders , None ) ) #NEWLINE# def cbRequest( response ) : #NEWLINE# #INDENT# self . assertEqual ( response . code , 200 ) #NEWLINE# self . assertEqual ( response . headers , Headers ( ) ) #NEWLINE# self . assertTrue ( self . transport . disconnecting ) #NEWLINE# self . assertEqual ( self . protocol . state , 'QUIESCENT' ) #NEWLINE# #UNINDENT# d . addCallback ( cbRequest ) #NEWLINE# self . protocol . dataReceived ( b'HTTP/1.1 200 OK\r\nContent-Length: 0\r\nConnection: close\r\n\r\n' ) #NEWLINE# return self