diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/models.py | 6 | ||||
| -rw-r--r-- | ishtar_common/tests.py | 14 | 
2 files changed, 10 insertions, 10 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 016883abe..b3ce847ce 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1113,8 +1113,8 @@ class FullSearch(models.Model):          if not hasattr(self, 'search_vector'):              return          if not self.pk: -            logger.warning("Cannot update search vector before save or " -                           "after deletion.") +            # logger.warning("Cannot update search vector before save or " +            #                "after deletion.")              return          if not self.BASE_SEARCH_VECTORS and not self.M2M_SEARCH_VECTORS \                  and not self.INT_SEARCH_VECTORS \ @@ -1588,7 +1588,7 @@ class LightHistorizedItem(BaseHistorizedItem):      def save(self, *args, **kwargs):          super(LightHistorizedItem, self).save(*args, **kwargs) -        return True +        return self  PARSE_FORMULA = re.compile("{([^}]*)}") 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]  | 
