From cb3094a4a73acb2e7c598242c9bc72778f9dad57 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Thu, 18 Sep 2014 15:46:49 +1000 Subject: [PATCH] Fix failing tests when WAGTAILSEARCH_BACKENDS not filled out The tests attempted to skip themselves when WAGTAILSEARCH_BACKENDS was not filled out, but the skip code was throwing an error, causing the test to fail. --- wagtail/wagtaildocs/tests.py | 4 ++-- wagtail/wagtailimages/tests.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wagtail/wagtaildocs/tests.py b/wagtail/wagtaildocs/tests.py index e4ec7f1ee..ba4874890 100644 --- a/wagtail/wagtaildocs/tests.py +++ b/wagtail/wagtaildocs/tests.py @@ -7,7 +7,7 @@ from django.core.urlresolvers import reverse from django.core.files.base import ContentFile from django.test.utils import override_settings -from wagtail.tests.utils import WagtailTestUtils +from wagtail.tests.utils import unittest, WagtailTestUtils from wagtail.wagtailcore.models import Page from wagtail.tests.models import EventPage, EventPageRelatedLink @@ -432,7 +432,7 @@ class TestIssue613(TestCase, WagtailTestUtils): return get_search_backend(backend_name) else: # no conf entry found - skip tests for this backend - raise unittest.SkipTest("No WAGTAILSEARCH_BACKENDS entry for the backend %s" % self.backend_path) + raise unittest.SkipTest("No WAGTAILSEARCH_BACKENDS entry for the backend %s" % backend_path) def setUp(self): self.search_backend = self.get_elasticsearch_backend() diff --git a/wagtail/wagtailimages/tests.py b/wagtail/wagtailimages/tests.py index 06ce8c9a8..8326c92fc 100644 --- a/wagtail/wagtailimages/tests.py +++ b/wagtail/wagtailimages/tests.py @@ -1051,7 +1051,7 @@ class TestIssue613(TestCase, WagtailTestUtils): return get_search_backend(backend_name) else: # no conf entry found - skip tests for this backend - raise unittest.SkipTest("No WAGTAILSEARCH_BACKENDS entry for the backend %s" % self.backend_path) + raise unittest.SkipTest("No WAGTAILSEARCH_BACKENDS entry for the backend %s" % backend_path) def setUp(self): self.search_backend = self.get_elasticsearch_backend()