def METHOD_NAME(get_configuration, request):
    """Configure a custom cdbs for testing.
    Restarting Wazuh is not needed for applying the configuration, it is optional.
    """
    # cdb configuration for testing
    cdb_dir = os.path.join(WAZUH_PATH, get_configuration['cdb_dir'])
    if not os.path.exists(cdb_dir):
        os.makedirs(cdb_dir)
    file_cdb_test = os.path.join(test_data_path, get_configuration['cdb_file'])
    file_cdb_dst = os.path.join(cdb_dir, get_configuration['cdb_file'])
    copy(file_cdb_test, file_cdb_dst)
    # rule configuration for testing
    rule_dir = os.path.join(WAZUH_PATH, get_configuration['rule_dir'])
    if not os.path.exists(rule_dir):
        os.makedirs(rule_dir)
    file_rule_test = os.path.join(test_data_path, get_configuration['rule_file'])
    file_rule_dst = os.path.join(rule_dir, get_configuration['rule_file'])
    copy(file_rule_test, file_rule_dst)
    yield
    # restore previous configuration
    os.remove(file_cdb_dst)
    if len(os.listdir(cdb_dir)) == 0:
        os.rmdir(cdb_dir)
    os.remove(file_rule_dst)
    if len(os.listdir(rule_dir)) == 0:
        os.rmdir(rule_dir)