'Assert that L{HTTPClientParser} parses the given C{response} to
C{request}, resulting in a response with no body and no extra bytes and
leaving the transport in the producing state.
@param request: A L{Request} instance which might have caused a server
to return the given response.
@param status: A string giving the status line of the response to be
parsed.
@param response: A string giving the response to be parsed.
@return: A C{dict} of headers from the response.'

def _noBodyTest(self, request, status, response):

    header = {}
    finished = []
    body = []
    bodyDataFinished = []
    protocol = HTTPClientParser(request, finished.append)
    protocol.headerReceived = header.__setitem__
    transport = StringTransport()
    protocol.makeConnection(transport)
    protocol.dataReceived(status)
    protocol.response._bodyDataReceived = body.append
    protocol.response._bodyDataFinished = (lambda : bodyDataFinished.append(True))
    protocol.dataReceived(response)
    self.assertEqual(transport.producerState, u'producing')
    self.assertEqual(protocol.state, DONE)
    self.assertEqual(body, [])
    self.assertEqual(finished, [''])
    self.assertEqual(bodyDataFinished, [True])
    self.assertEqual(protocol.response.length, 0)
    return header
