#NEWLINE# def assertForwardsHeaders( self , proxyClient , requestLine , headers ) : #NEWLINE# #INDENT# '\n        Assert that C{proxyClient} sends C{headers} when it connects.\n\n        @param proxyClient: A L{ProxyClient}.\n        @param requestLine: The request line we expect to be sent.\n        @param headers: A dict of headers we expect to be sent.\n        @return: If the assertion is successful, return the request body as\n            bytes.\n        ' #NEWLINE# self . connectProxy ( receivedLine ) #NEWLINE# requestContent = proxyClient . transport . value ( ) #NEWLINE# ( receivedLine , receivedHeaders , body ) = self . _parseOutHeaders ( requestContent ) #NEWLINE# self . assertEquals ( receivedLine , requestLine ) #NEWLINE# self . assertEquals ( receivedHeaders , headers ) #NEWLINE# return body