def put_udf_files(context, comments): """ Creates UDF files with the given comments. """ for comment in comments: content = u"--[=======[\n" + comment + u"\n--]=======]\n" path = lib.put_udf_file(content) context[os.path.basename(path)] = content
def put_data(context): """ Inserts the test data that we'll then filter. """ lib.write_record(SET_NAME_1, KEY, [BIN_NAME_1, BIN_NAME_2], [VALUE_1, VALUE_2]) lib.write_record(SET_NAME_2, KEY, [BIN_NAME_1, BIN_NAME_2], [VALUE_1, VALUE_2]) lib.create_string_index(SET_NAME_1, BIN_NAME_1, INDEX_NAME_1) lib.create_string_index(SET_NAME_2, BIN_NAME_2, INDEX_NAME_2) context["udf_file"] = os.path.basename(lib.put_udf_file(UDF_FILE_DATA))