def test_http2_present(self):
        """
        If the transport reports that HTTP/2 is negotiated and HTTP/2 is
        present, that's what's negotiated.
        """
        b = StringTransport()
        b.negotiatedProtocol = b'h2'
        negotiatedProtocol = self._negotiatedProtocolForTransportInstance(b)
        self.assertEqual(negotiatedProtocol, b'h2')

        If the transport reports that HTTP/2 is negotiated and HTTP/2 is
        present, that's what's negotiated.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_http.py