diff --git a/src/rougail/loader.py b/src/rougail/loader.py
index 097a43603..d45a0cde9 100644
--- a/src/rougail/loader.py
+++ b/src/rougail/loader.py
@@ -385,18 +385,21 @@ class Variable(Common):
if 'default' not in self.attrib:
self.attrib['default'] = []
value = convert_tiramisu_value(child.text, type_)
- if not isinstance(value, list) and not is_follower:
- value = [value]
- self.attrib['default'].append(value)
- if 'default_multi' not in self.attrib and not is_leader:
- self.attrib['default_multi'] = value
+ if not is_follower:
+ if not isinstance(value, list):
+ dvalue = [value]
+ else:
+ dvalue = value
+ self.attrib['default'].append(dvalue)
+ if value and 'default_multi' not in self.attrib and not is_leader:
+ self.attrib['default_multi'] = []
+ if not is_leader:
+ self.attrib['default_multi'].append(value)
else:
if 'default' in self.attrib:
raise CreoleLoaderError(_('default value already set for {}'
'').format(self.attrib['path']))
value = convert_tiramisu_value(child.text, type_)
- if value is None: # and (elt.attrib['type'] != 'choice' or value not in self.attrib['values']):
- value = u''
if is_follower:
self.attrib['default_multi'] = value
else:
diff --git a/tests/flattener_dicos/10load_masterslaves/00-base.xml b/tests/flattener_dicos/10leadership_append/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves/00-base.xml
rename to tests/flattener_dicos/10leadership_append/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_append/01-base.xml b/tests/flattener_dicos/10leadership_append/01-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_append/01-base.xml
rename to tests/flattener_dicos/10leadership_append/01-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_append/makedict/base.json b/tests/flattener_dicos/10leadership_append/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_append/makedict/base.json
rename to tests/flattener_dicos/10leadership_append/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslaves_append/result/00-base.xml b/tests/flattener_dicos/10leadership_append/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_append/result/00-base.xml
rename to tests/flattener_dicos/10leadership_append/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_auto/00-base.xml b/tests/flattener_dicos/10leadership_auto/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_auto/00-base.xml
rename to tests/flattener_dicos/10leadership_auto/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_auto/makedict/base.json b/tests/flattener_dicos/10leadership_auto/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_auto/makedict/base.json
rename to tests/flattener_dicos/10leadership_auto/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslaves_auto/result/00-base.xml b/tests/flattener_dicos/10leadership_auto/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_auto/result/00-base.xml
rename to tests/flattener_dicos/10leadership_auto/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_automaster/00-base.xml b/tests/flattener_dicos/10leadership_autoleader/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_automaster/00-base.xml
rename to tests/flattener_dicos/10leadership_autoleader/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_automaster/makedict/base.json b/tests/flattener_dicos/10leadership_autoleader/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_automaster/makedict/base.json
rename to tests/flattener_dicos/10leadership_autoleader/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslaves_automaster/result/00-base.xml b/tests/flattener_dicos/10leadership_autoleader/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_automaster/result/00-base.xml
rename to tests/flattener_dicos/10leadership_autoleader/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_automaster_expert/00-base.xml b/tests/flattener_dicos/10leadership_autoleader_expert/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_automaster_expert/00-base.xml
rename to tests/flattener_dicos/10leadership_autoleader_expert/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_automaster_expert/makedict/base.json b/tests/flattener_dicos/10leadership_autoleader_expert/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_automaster_expert/makedict/base.json
rename to tests/flattener_dicos/10leadership_autoleader_expert/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslaves_automaster_expert/result/00-base.xml b/tests/flattener_dicos/10leadership_autoleader_expert/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_automaster_expert/result/00-base.xml
rename to tests/flattener_dicos/10leadership_autoleader_expert/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_autosaveexpert/00-base.xml b/tests/flattener_dicos/10leadership_autosaveexpert/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_autosaveexpert/00-base.xml
rename to tests/flattener_dicos/10leadership_autosaveexpert/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_autosaveexpert/makedict/base.json b/tests/flattener_dicos/10leadership_autosaveexpert/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslave_autosaveexpert/makedict/base.json
rename to tests/flattener_dicos/10leadership_autosaveexpert/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslave_autosaveexpert/result/00-base.xml b/tests/flattener_dicos/10leadership_autosaveexpert/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_autosaveexpert/result/00-base.xml
rename to tests/flattener_dicos/10leadership_autosaveexpert/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_familyaccent/00-base.xml b/tests/flattener_dicos/10leadership_familyaccent/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_familyaccent/00-base.xml
rename to tests/flattener_dicos/10leadership_familyaccent/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_mandatory/makedict/base.json b/tests/flattener_dicos/10leadership_familyaccent/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslave_mandatory/makedict/base.json
rename to tests/flattener_dicos/10leadership_familyaccent/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslaves_familyaccent/result/00-base.xml b/tests/flattener_dicos/10leadership_familyaccent/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_familyaccent/result/00-base.xml
rename to tests/flattener_dicos/10leadership_familyaccent/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_mastermandatory/00-base.xml b/tests/flattener_dicos/10leadership_leadermandatory/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_mastermandatory/00-base.xml
rename to tests/flattener_dicos/10leadership_leadermandatory/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_mastermandatory/makedict/base.json b/tests/flattener_dicos/10leadership_leadermandatory/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslave_mastermandatory/makedict/base.json
rename to tests/flattener_dicos/10leadership_leadermandatory/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslave_mastermandatory/result/00-base.xml b/tests/flattener_dicos/10leadership_leadermandatory/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_mastermandatory/result/00-base.xml
rename to tests/flattener_dicos/10leadership_leadermandatory/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_mandatory/00-base.xml b/tests/flattener_dicos/10leadership_mandatory/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_mandatory/00-base.xml
rename to tests/flattener_dicos/10leadership_mandatory/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_familyaccent/makedict/base.json b/tests/flattener_dicos/10leadership_mandatory/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_familyaccent/makedict/base.json
rename to tests/flattener_dicos/10leadership_mandatory/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslave_mandatory/result/00-base.xml b/tests/flattener_dicos/10leadership_mandatory/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_mandatory/result/00-base.xml
rename to tests/flattener_dicos/10leadership_mandatory/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_mandatoryslave/00-base.xml b/tests/flattener_dicos/10leadership_mandatoryfollower/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_mandatoryslave/00-base.xml
rename to tests/flattener_dicos/10leadership_mandatoryfollower/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_mandatoryslave/makedict/base.json b/tests/flattener_dicos/10leadership_mandatoryfollower/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslave_mandatoryslave/makedict/base.json
rename to tests/flattener_dicos/10leadership_mandatoryfollower/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslave_mandatoryslave/result/00-base.xml b/tests/flattener_dicos/10leadership_mandatoryfollower/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_mandatoryslave/result/00-base.xml
rename to tests/flattener_dicos/10leadership_mandatoryfollower/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_multi/00-base.xml b/tests/flattener_dicos/10leadership_multi/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_multi/00-base.xml
rename to tests/flattener_dicos/10leadership_multi/00-base.xml
diff --git a/tests/flattener_dicos/10masterslave_multi/makedict/base.json b/tests/flattener_dicos/10leadership_multi/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10masterslave_multi/makedict/base.json
rename to tests/flattener_dicos/10leadership_multi/makedict/base.json
diff --git a/tests/flattener_dicos/10masterslave_multi/result/00-base.xml b/tests/flattener_dicos/10leadership_multi/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslave_multi/result/00-base.xml
rename to tests/flattener_dicos/10leadership_multi/result/00-base.xml
diff --git a/tests/flattener_dicos/10masterslaves_append/00-base.xml b/tests/flattener_dicos/10load_leadership/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10masterslaves_append/00-base.xml
rename to tests/flattener_dicos/10load_leadership/00-base.xml
diff --git a/tests/flattener_dicos/10load_masterslaves/makedict/base.json b/tests/flattener_dicos/10load_leadership/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves/makedict/base.json
rename to tests/flattener_dicos/10load_leadership/makedict/base.json
diff --git a/tests/flattener_dicos/10load_masterslaves/result/00-base.xml b/tests/flattener_dicos/10load_leadership/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves/result/00-base.xml
rename to tests/flattener_dicos/10load_leadership/result/00-base.xml
diff --git a/tests/flattener_dicos/10load_masterslaves_default_multi/00-base.xml b/tests/flattener_dicos/10load_leadership_default_multi/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_default_multi/00-base.xml
rename to tests/flattener_dicos/10load_leadership_default_multi/00-base.xml
diff --git a/tests/flattener_dicos/10load_masterslaves_default_multi/makedict/base.json b/tests/flattener_dicos/10load_leadership_default_multi/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_default_multi/makedict/base.json
rename to tests/flattener_dicos/10load_leadership_default_multi/makedict/base.json
diff --git a/tests/flattener_dicos/10load_masterslaves_default_multi/result/00-base.xml b/tests/flattener_dicos/10load_leadership_default_multi/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_default_multi/result/00-base.xml
rename to tests/flattener_dicos/10load_leadership_default_multi/result/00-base.xml
diff --git a/tests/flattener_dicos/10load_leadership_default_submulti/00-base.xml b/tests/flattener_dicos/10load_leadership_default_submulti/00-base.xml
new file mode 100644
index 000000000..e161f0de2
--- /dev/null
+++ b/tests/flattener_dicos/10load_leadership_default_submulti/00-base.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+ non
+
+
+ leader
+
+
+ value
+
+
+ value1
+ value2
+
+
+
+
+
+
+ follower1
+ follower2
+
+
+
+
+
+
diff --git a/tests/flattener_dicos/10load_leadership_default_submulti/makedict/base.json b/tests/flattener_dicos/10load_leadership_default_submulti/makedict/base.json
new file mode 100644
index 000000000..7c8f04444
--- /dev/null
+++ b/tests/flattener_dicos/10load_leadership_default_submulti/makedict/base.json
@@ -0,0 +1 @@
+{"creole.general.mode_conteneur_actif": ["non"], "creole.general.leader.leader": ["leader"], "creole.general.leader.follower1": [["value"]], "creole.general.leader.follower2": [["value1", "value2"]]}
diff --git a/tests/flattener_dicos/10load_leadership_default_submulti/result/00-base.xml b/tests/flattener_dicos/10load_leadership_default_submulti/result/00-base.xml
new file mode 100644
index 000000000..e3db58a98
--- /dev/null
+++ b/tests/flattener_dicos/10load_leadership_default_submulti/result/00-base.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ normal
+
+ oui
+ non
+ mandatory
+ normal
+ non
+
+
+ normal
+
+ mandatory
+ leader
+
+
+ mandatory
+ normal
+ value
+
+
+ mandatory
+ normal
+ value1
+ value2
+
+
+
+
+
diff --git a/tests/flattener_dicos/10load_masterslaves_defaultmulti_master/00-base.xml b/tests/flattener_dicos/10load_leadership_defaultmulti_leader/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_defaultmulti_master/00-base.xml
rename to tests/flattener_dicos/10load_leadership_defaultmulti_leader/00-base.xml
diff --git a/tests/flattener_dicos/10load_masterslaves_defaultmulti_master/makedict/base.json b/tests/flattener_dicos/10load_leadership_defaultmulti_leader/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_defaultmulti_master/makedict/base.json
rename to tests/flattener_dicos/10load_leadership_defaultmulti_leader/makedict/base.json
diff --git a/tests/flattener_dicos/10load_masterslaves_defaultmulti_master/result/00-base.xml b/tests/flattener_dicos/10load_leadership_defaultmulti_leader/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_defaultmulti_master/result/00-base.xml
rename to tests/flattener_dicos/10load_leadership_defaultmulti_leader/result/00-base.xml
diff --git a/tests/flattener_dicos/10load_masterslaves_description/00-base.xml b/tests/flattener_dicos/10load_leadership_description/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_description/00-base.xml
rename to tests/flattener_dicos/10load_leadership_description/00-base.xml
diff --git a/tests/flattener_dicos/10load_masterslaves_description/makedict/base.json b/tests/flattener_dicos/10load_leadership_description/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_description/makedict/base.json
rename to tests/flattener_dicos/10load_leadership_description/makedict/base.json
diff --git a/tests/flattener_dicos/10load_masterslaves_description/result/00-base.xml b/tests/flattener_dicos/10load_leadership_description/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_description/result/00-base.xml
rename to tests/flattener_dicos/10load_leadership_description/result/00-base.xml
diff --git a/tests/flattener_dicos/10load_masterslaves_normalize_family/00-base.xml b/tests/flattener_dicos/10load_leadership_normalize_family/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_normalize_family/00-base.xml
rename to tests/flattener_dicos/10load_leadership_normalize_family/00-base.xml
diff --git a/tests/flattener_dicos/10load_masterslaves_normalize_family/01-base.xml b/tests/flattener_dicos/10load_leadership_normalize_family/01-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_normalize_family/01-base.xml
rename to tests/flattener_dicos/10load_leadership_normalize_family/01-base.xml
diff --git a/tests/flattener_dicos/10load_masterslaves_normalize_family/makedict/base.json b/tests/flattener_dicos/10load_leadership_normalize_family/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_normalize_family/makedict/base.json
rename to tests/flattener_dicos/10load_leadership_normalize_family/makedict/base.json
diff --git a/tests/flattener_dicos/10load_masterslaves_normalize_family/result/00-base.xml b/tests/flattener_dicos/10load_leadership_normalize_family/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10load_masterslaves_normalize_family/result/00-base.xml
rename to tests/flattener_dicos/10load_leadership_normalize_family/result/00-base.xml
diff --git a/tests/flattener_dicos/10load_leadership_submulti/00-base.xml b/tests/flattener_dicos/10load_leadership_submulti/00-base.xml
new file mode 100644
index 000000000..3d4b93ede
--- /dev/null
+++ b/tests/flattener_dicos/10load_leadership_submulti/00-base.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+ non
+
+
+
+
+
+
+
+
+
+
+
+ valfill
+
+
+ follower1
+
+
+ follower1
+ follower2
+
+
+
+
+
+
diff --git a/tests/flattener_dicos/10load_leadership_submulti/makedict/base.json b/tests/flattener_dicos/10load_leadership_submulti/makedict/base.json
new file mode 100644
index 000000000..7637dca25
--- /dev/null
+++ b/tests/flattener_dicos/10load_leadership_submulti/makedict/base.json
@@ -0,0 +1 @@
+{"creole.general.mode_conteneur_actif": "non", "creole.general1.leader.leader": [], "creole.general1.leader.follower1": [], "creole.general1.leader.follower2": []}
diff --git a/tests/flattener_dicos/10load_leadership_submulti/result/00-base.xml b/tests/flattener_dicos/10load_leadership_submulti/result/00-base.xml
new file mode 100644
index 000000000..12ae000d5
--- /dev/null
+++ b/tests/flattener_dicos/10load_leadership_submulti/result/00-base.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ normal
+
+ oui
+ non
+ mandatory
+ normal
+ non
+
+
+
+ normal
+
+ normal
+
+
+ normal
+
+ valfill
+
+
+
+ normal
+
+ creole.general1.leader.follower1
+
+
+
+
+
+
diff --git a/tests/flattener_dicos/10load_submulti_two_value/00-base.xml b/tests/flattener_dicos/10load_submulti_two_value/00-base.xml
new file mode 100644
index 000000000..49c2fe255
--- /dev/null
+++ b/tests/flattener_dicos/10load_submulti_two_value/00-base.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+ non
+ oui
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/flattener_dicos/10load_submulti_two_value/makedict/base.json b/tests/flattener_dicos/10load_submulti_two_value/makedict/base.json
new file mode 100644
index 000000000..a36d5a831
--- /dev/null
+++ b/tests/flattener_dicos/10load_submulti_two_value/makedict/base.json
@@ -0,0 +1 @@
+{"creole.general.mode_conteneur_actif": [["non"], ["oui"]]}
diff --git a/tests/flattener_dicos/10load_submulti_two_value/result/00-base.xml b/tests/flattener_dicos/10load_submulti_two_value/result/00-base.xml
new file mode 100644
index 000000000..ef247d1b4
--- /dev/null
+++ b/tests/flattener_dicos/10load_submulti_two_value/result/00-base.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ normal
+
+ oui
+ non
+ mandatory
+ normal
+ non
+ oui
+
+
+
+
+
diff --git a/tests/flattener_dicos/10valid_enum_master/00-base.xml b/tests/flattener_dicos/10valid_enum_leader/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10valid_enum_master/00-base.xml
rename to tests/flattener_dicos/10valid_enum_leader/00-base.xml
diff --git a/tests/flattener_dicos/10valid_enum_master/makedict/base.json b/tests/flattener_dicos/10valid_enum_leader/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/10valid_enum_master/makedict/base.json
rename to tests/flattener_dicos/10valid_enum_leader/makedict/base.json
diff --git a/tests/flattener_dicos/10valid_enum_master/result/00-base.xml b/tests/flattener_dicos/10valid_enum_leader/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/10valid_enum_master/result/00-base.xml
rename to tests/flattener_dicos/10valid_enum_leader/result/00-base.xml
diff --git a/tests/flattener_dicos/20family_modemasterslaves/00-base.xml b/tests/flattener_dicos/20family_modeleadership/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/20family_modemasterslaves/00-base.xml
rename to tests/flattener_dicos/20family_modeleadership/00-base.xml
diff --git a/tests/flattener_dicos/20family_modemasterslaves/makedict/base.json b/tests/flattener_dicos/20family_modeleadership/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/20family_modemasterslaves/makedict/base.json
rename to tests/flattener_dicos/20family_modeleadership/makedict/base.json
diff --git a/tests/flattener_dicos/20family_modemasterslaves/result/00-base.xml b/tests/flattener_dicos/20family_modeleadership/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/20family_modemasterslaves/result/00-base.xml
rename to tests/flattener_dicos/20family_modeleadership/result/00-base.xml
diff --git a/tests/flattener_dicos/40ifin_masterslaves/00-base.xml b/tests/flattener_dicos/40ifin_leadership/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/40ifin_masterslaves/00-base.xml
rename to tests/flattener_dicos/40ifin_leadership/00-base.xml
diff --git a/tests/flattener_dicos/40ifin_masterslaves/makedict/base.json b/tests/flattener_dicos/40ifin_leadership/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/40ifin_masterslaves/makedict/base.json
rename to tests/flattener_dicos/40ifin_leadership/makedict/base.json
diff --git a/tests/flattener_dicos/40ifin_masterslaves/result/00-base.xml b/tests/flattener_dicos/40ifin_leadership/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/40ifin_masterslaves/result/00-base.xml
rename to tests/flattener_dicos/40ifin_leadership/result/00-base.xml
diff --git a/tests/flattener_dicos/40ifin_masterslavesauto/00-base.xml b/tests/flattener_dicos/40ifin_leadershipauto/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/40ifin_masterslavesauto/00-base.xml
rename to tests/flattener_dicos/40ifin_leadershipauto/00-base.xml
diff --git a/tests/flattener_dicos/40ifin_masterslavesauto/makedict/base.json b/tests/flattener_dicos/40ifin_leadershipauto/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/40ifin_masterslavesauto/makedict/base.json
rename to tests/flattener_dicos/40ifin_leadershipauto/makedict/base.json
diff --git a/tests/flattener_dicos/40ifin_masterslavesauto/result/00-base.xml b/tests/flattener_dicos/40ifin_leadershipauto/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/40ifin_masterslavesauto/result/00-base.xml
rename to tests/flattener_dicos/40ifin_leadershipauto/result/00-base.xml
diff --git a/tests/flattener_dicos/70container_pathaccess_masterslaves/00-base.xml b/tests/flattener_dicos/70container_pathaccess_leadership/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/70container_pathaccess_masterslaves/00-base.xml
rename to tests/flattener_dicos/70container_pathaccess_leadership/00-base.xml
diff --git a/tests/flattener_dicos/70container_pathaccess_masterslaves/makedict/base.json b/tests/flattener_dicos/70container_pathaccess_leadership/makedict/base.json
similarity index 100%
rename from tests/flattener_dicos/70container_pathaccess_masterslaves/makedict/base.json
rename to tests/flattener_dicos/70container_pathaccess_leadership/makedict/base.json
diff --git a/tests/flattener_dicos/70container_pathaccess_masterslaves/result/00-base.xml b/tests/flattener_dicos/70container_pathaccess_leadership/result/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/70container_pathaccess_masterslaves/result/00-base.xml
rename to tests/flattener_dicos/70container_pathaccess_leadership/result/00-base.xml
diff --git a/tests/flattener_dicos/80masterslave_auto_save/00-base.xml b/tests/flattener_dicos/80leadership_auto_save/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/80masterslave_auto_save/00-base.xml
rename to tests/flattener_dicos/80leadership_auto_save/00-base.xml
diff --git a/tests/flattener_dicos/80masterslaves_autofreeze/00-base.xml b/tests/flattener_dicos/80leadership_autofreeze/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/80masterslaves_autofreeze/00-base.xml
rename to tests/flattener_dicos/80leadership_autofreeze/00-base.xml
diff --git a/tests/flattener_dicos/80leadership_none_slave_between_slave/00-base.xml b/tests/flattener_dicos/80leadership_none_follower_between_follower/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/80leadership_none_slave_between_slave/00-base.xml
rename to tests/flattener_dicos/80leadership_none_follower_between_follower/00-base.xml
diff --git a/tests/flattener_dicos/80masterslave_notexists/00-base.xml b/tests/flattener_dicos/80leadership_notexists/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/80masterslave_notexists/00-base.xml
rename to tests/flattener_dicos/80leadership_notexists/00-base.xml
diff --git a/tests/flattener_dicos/80masterslaves_notmulti/00-base.xml b/tests/flattener_dicos/80leadership_notmulti/00-base.xml
similarity index 100%
rename from tests/flattener_dicos/80masterslaves_notmulti/00-base.xml
rename to tests/flattener_dicos/80leadership_notmulti/00-base.xml
diff --git a/tests/test_flattener.py b/tests/test_flattener.py
index 7de333c1b..9fa081df6 100644
--- a/tests/test_flattener.py
+++ b/tests/test_flattener.py
@@ -65,7 +65,7 @@ def compare_xml(exported_xmlfile, expected_xmlfile):
raise err
-def launch_flattener(test_dir):
+def launch_flattener(test_dir, test_ok=False):
eolobj = objspace.CreoleObjSpace(dtdfilename)
dirs = [test_dir]
subfolder = join(test_dir, 'subfolder')
@@ -85,6 +85,8 @@ def launch_flattener(test_dir):
if isfile(result_file):
# eolobj.save(result_file)
compare_xml(destfile, result_file)
+ elif test_ok:
+ raise Exception(f'no test found for {test_dir}')
def fake_traduc(txt):
@@ -105,7 +107,7 @@ def teardown_module(module):
def test_dictionary(test_dir):
test_dir = join(dico_dirs, test_dir)
- launch_flattener(test_dir)
+ launch_flattener(test_dir, True)
def test_error_dictionary(test_dir_error):
diff --git a/tests/test_makedict.py b/tests/test_makedict.py
index ad06af803..dcbc16d11 100644
--- a/tests/test_makedict.py
+++ b/tests/test_makedict.py
@@ -24,7 +24,7 @@ for test in listdir(dico_dirs):
excludes = set([])
#excludes = set(['70container_services'])
test_ok -= excludes
-#test_ok = ['70container_services']
+#test_ok = ['10load_leadership_default_submulti']
test_ok = list(test_ok)