def METHOD_NAME(self):
    session = TLSSession(MagicMock())
    with self.assertRaises(TLSError):
        session.connect(host=None, certfile=CERTFILE_WITH_KEY,
                        protocol=tls_proto)