'After the last header is received, L{HTTPParser} calls
C{allHeadersReceived}.'

def test_allHeadersCallback(self):

    called = []
    (header, protocol) = self._headerTestSetup()
    def allHeadersReceived():
        called.append(protocol.state)
        protocol.state = STATUS
    protocol.allHeadersReceived = allHeadersReceived
    protocol.dataReceived(self.sep)
    self.assertEqual(called, [HEADER])
    self.assertEqual(protocol.state, STATUS)
