'Write given config to a temporary file which will be cleaned
up in teardown.
Returns full path to the file.'

def write_config(self, path, config_str):

    cfg_file = open(path, 'w')
    cfg_file.write(config_str)
    cfg_file.close()
    return path
