'The C{quiescentCallback} passed to L{HTTP11ClientProtocol} will only be
invoked once that protocol is in a state similar to its initial state.
One of the aspects of this initial state is the producer-state of its
transport; an L{HTTP11ClientProtocol} begins with a transport that is
producing, i.e. not C{pauseProducing}\'d.
Therefore, when C{quiescentCallback} is invoked the protocol will still
be producing.'

def test_transportProducingWhenQuiescentAfterFullBody(self):

    quiescentResult = []
    def callback(p):
        self.assertEqual(p, protocol)
        self.assertEqual(p.state, u'QUIESCENT')
        quiescentResult.append(p)
    transport = StringTransport()
    protocol = HTTP11ClientProtocol(callback)
    protocol.makeConnection(transport)
    requestDeferred = protocol.request(Request('GET', '/', _boringHeaders, None, persistent=True))
    protocol.dataReceived('HTTP/1.1    200    OK\r\nContent-length:    3\r\n\r\nBBB')
    response = self.successResultOf(requestDeferred)
    self.assertEqual(response._state, u'DEFERRED_CLOSE')
    self.assertEqual(len(quiescentResult), 1)
    self.assertEqual(transport.producerState, u'producing')
