def METHOD_NAME(self):
    session = TLSSession(MagicMock())
    with self.assertRaises(TLSError):
        # Use arbitrary string to point to non-existing key location.
        session.connect(host=HOST, certfile=CERTFILE_WITH_KEY,
                        ca_certs='-', protocol=tls_proto)