diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-01 12:41:44 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-13 18:26:03 +0200 | 
| commit | b93797feaa842068f7b93676bddb7ca3e14eb356 (patch) | |
| tree | 34a471d9e263947fdfc6e6f1c2287f2fd3cb411a /ishtar_common/tests.py | |
| parent | 5bd94ea3b1083607642afaf014d2663ce420febf (diff) | |
| download | Ishtar-b93797feaa842068f7b93676bddb7ca3e14eb356.tar.bz2 Ishtar-b93797feaa842068f7b93676bddb7ca3e14eb356.zip | |
Fix innapropriate parcel deletion
Diffstat (limited to 'ishtar_common/tests.py')
| -rw-r--r-- | ishtar_common/tests.py | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index defc3a0c3..c2abab10c 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -285,17 +285,17 @@ class WizardTest(object):      def pass_test(self):          return False -    def check_response(self, response, current_step): +    def check_response(self, response, current_step, data_idx):          if "errorlist" in response.content: -            soup = Soup(response.content) +            soup = Soup(response.content, "lxml")              errorlist = soup.findAll(                  "ul", {"class": "errorlist"})              errors = []              for li in errorlist:                  lbl = li.findParent().findParent().findChild().text                  errors.append(u"{} - {}".format(lbl, li.text)) -            raise ValidationError(u"Errors: {} on {}.".format( -                u" ".join(errors), current_step)) +            raise ValidationError(u"Errors: {} on {} - dataset {}.".format( +                u" ".join(errors), current_step, data_idx + 1))      @classmethod      def wizard_post(cls, client, url, current_step, form_data=None, @@ -334,7 +334,7 @@ class WizardTest(object):              return          url = reverse(self.url_name)          self.pre_wizard() -        for test_form_data in self.form_datas: +        for data_idx, test_form_data in enumerate(self.form_datas):              test_form_data.inits(self)              form_data = test_form_data.form_datas              ignored = test_form_data.ignored @@ -353,9 +353,9 @@ class WizardTest(object):                  if current_step == test_form_data.error_expected:                      with self.assertRaises(ValidationError): -                        self.check_response(response, current_step) +                        self.check_response(response, current_step, data_idx)                  else: -                    self.check_response(response, current_step) +                    self.check_response(response, current_step, data_idx)                  if next_form_is_checked:                      next_form = self.steps[idx + 1][0] | 
