def _validate_request(self, proc=None):
        if 'invalid_host' in self.url:
            # Simulate connecting to an invalid host/port in order to
            # raise `socket.error: [Errno 111] Connection refused`
            socket().connect(('localhost', 38837))
        elif 'invalid_pass' in self.url:
            # Simulate xmlrpc exception for invalid credentials
            raise xmlrpclib.ProtocolError(self.url[7:], 401,
                                          'Unauthorized', None)
        elif proc is not None and 'invalid' in proc:
            # Simulate xmlrpc exception for process not found
            raise xmlrpclib.Fault(10, 'BAD_NAME')
Configure the Pylons environment via the ``pylons.config``
dataset/ETHPy150Open serverdensity/sd-agent/tests/checks/mock/test_supervisord.py/MockSupervisor._validate_request--crossover with--dataset/ETHPy150Open Pylons/pylons/tests/test_webapps/filestotest/environment_def_engine.py/load_environment