From f1c39260f07f87532ab194899b27e289e5cb558a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 23 Jan 2020 11:19:49 +0100 Subject: Fix test initialization for wizards --- ishtar_common/tests.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ishtar_common/tests.py') 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, -- cgit v1.2.3