mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-19 20:41:56 +00:00
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.
This commit is contained in:
parent
22b32d767e
commit
cb3094a4a7
2 changed files with 3 additions and 3 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue