def METHOD_NAME(self):
    """Tests loading config settings from a TOML configuration file.
    Sets the SAWTOOTH_HOME environment variable to a temporary directory,
    writes a rest_api.toml config file, then loads that config and verifies
    all the rest_api settings are their expected values.
    The test also attempts to avoid environment variables from interfering
    with the test by clearing os.environ and restoring it after the test.
    """
    orig_environ = dict(os.environ)
    os.environ.clear()
    directory = tempfile.mkdtemp(prefix="test-path-config-")
    try:
        os.environ['SAWTOOTH_HOME'] = directory
        config_dir = os.path.join(directory, 'etc')
        os.mkdir(config_dir)
        filename = os.path.join(config_dir, 'rest_api.toml')
        with open(filename, 'w') as fd:
            fd.write('bind = ["test:1234"]')
            fd.write(os.linesep)
            fd.write('connect = "tcp://test:4004"')
            fd.write(os.linesep)
            fd.write('timeout = 10')
            fd.write(os.linesep)
            fd.write('opentsdb_db = "data_base"')
            fd.write(os.linesep)
            fd.write('opentsdb_url = "http://data_base:0000"')
            fd.write(os.linesep)
            fd.write('opentsdb_username = "name"')
            fd.write(os.linesep)
            fd.write('opentsdb_password = "secret"')
        config = load_toml_rest_api_config(filename)
        self.assertEqual(config.bind, ["test:1234"])
        self.assertEqual(config.connect, "tcp://test:4004")
        self.assertEqual(config.timeout, 10)
        self.assertEqual(config.opentsdb_db, "data_base")
        self.assertEqual(config.opentsdb_url, "http://data_base:0000")
        self.assertEqual(config.opentsdb_username, "name")
        self.assertEqual(config.opentsdb_password, "secret")
    finally:
        os.environ.clear()
        os.environ.update(orig_environ)
        shutil.rmtree(directory)