def test_dataBeforeVersion(self):
        """
        Test that the transport ignores data sent before the version string.
        """
        proto = MockTransportBase()
        proto.makeConnection(proto_helpers.StringTransport())
        data = (b"""here's some stuff beforehand
here's some other stuff
""" + proto.ourVersionString + b"\r\n")
        [proto.dataReceived(c) for c in iterbytes(data)]
        self.assertTrue(proto.gotVersion)
        self.assertEqual(proto.otherVersionString, proto.ourVersionString)

        Test that the transport ignores data sent before the version string.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_transport.py