diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-01-23 11:19:49 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-07-01 18:01:59 +0200 |
commit | f1c39260f07f87532ab194899b27e289e5cb558a (patch) | |
tree | a0eb208693797006754d81f5f2f7167cab5d0e1c /ishtar_common/tests.py | |
parent | 71fd406a6552304d11fcaad373c9ee326222d31e (diff) | |
download | Ishtar-f1c39260f07f87532ab194899b27e289e5cb558a.tar.bz2 Ishtar-f1c39260f07f87532ab194899b27e289e5cb558a.zip |
Fix test initialization for wizards
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r-- | ishtar_common/tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 0eda481b1..bfb66fee0 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -357,7 +357,7 @@ class WizardTestFormData(object): :return: None """ if form_name not in self.form_datas: - self.form_datas[form_name] = {} + self.form_datas[form_name] = [] self.form_datas[form_name].append(value) def inits(self, test_object): @@ -367,7 +367,7 @@ class WizardTestFormData(object): suffix = '-' + test_object.url_name # if form names are defined without url_name fix it - for form_name in self.form_datas.keys(): + for form_name in list(self.form_datas.keys()): if suffix in form_name: continue self.form_datas[form_name + suffix] = self.form_datas.pop(form_name) @@ -440,9 +440,9 @@ class WizardTest(object): errors = [] for li in errorlist: lbl = li.findParent().findParent().findChild().text - errors.append(u"{} - {}".format(lbl, li.text)) - raise ValidationError(u"Errors: {} on {} - dataset {}.".format( - u" ".join(errors), current_step, data_idx + 1)) + errors.append("{} - {}".format(lbl, li.text)) + raise ValidationError("Errors: {} on {} - dataset {}.".format( + " ".join(errors), current_step, data_idx + 1)) @classmethod def wizard_post(cls, client, url, current_step, form_data=None, |