'When a 1XX response is ignored, Twisted emits a log.'

def test_ignored1XXResponseCausesLog(self):

    sample103Response = 'HTTP/1.1    103    Early    Hints\r\nServer:    socketserver/1.0.0\r\nLink:    </other/styles.css>;    rel=preload;    as=style\r\nLink:    </other/action.js>;    rel=preload;    as=script\r\n\r\n'
    logs = []
    log.addObserver(logs.append)
    self.addCleanup(log.removeObserver, logs.append)
    protocol = HTTPClientParser(Request('GET', '/', _boringHeaders, None), (lambda ign: None))
    protocol.makeConnection(StringTransport())
    protocol.dataReceived(sample103Response)
    self.assertEqual(logs[0]['message'][0], 'Ignoring    unexpected    103    response')
