'All headers received by L{HTTPParser} are added to
L{HTTPParser.headers}.'

def test_headersSavedOnResponse(self):

    protocol = HTTPParser()
    protocol.makeConnection(StringTransport())
    protocol.dataReceived(('HTTP/1.1    200    OK' + self.sep))
    protocol.dataReceived(('X-Foo:    bar' + self.sep))
    protocol.dataReceived(('X-Foo:    baz' + self.sep))
    protocol.dataReceived(self.sep)
    expected = [('X-Foo', ['bar', 'baz'])]
    self.assertEqual(expected, list(protocol.headers.getAllRawHeaders()))
