mirror of
https://github.com/Hopiu/django-watson.git
synced 2026-05-04 03:44:42 +00:00
fixing tests
This commit is contained in:
parent
0dc92173b6
commit
0cd1318919
1 changed files with 13 additions and 3 deletions
|
|
@ -30,6 +30,17 @@ from watson.backends import escape_query
|
|||
from test_watson.models import WatsonTestModel1, WatsonTestModel2
|
||||
from test_watson import admin # Force early registration of all admin models.
|
||||
|
||||
# test settings to override
|
||||
SETTINGS_OVERRIDE = {
|
||||
'TEMPLATES': [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': ['templates'],
|
||||
'APP_DIRS': True,
|
||||
},
|
||||
],
|
||||
'ROOT_URLCONF': 'test_watson.urls',
|
||||
}
|
||||
|
||||
class RegistrationTest(TestCase):
|
||||
|
||||
|
|
@ -560,7 +571,7 @@ class ComplexRegistrationTest(SearchTestBase):
|
|||
self.assertEqual(complex_registration_search_engine.filter(WatsonTestModel2, "DESCRIPTION").count(), 0)
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF="test_watson.urls")
|
||||
@override_settings(**SETTINGS_OVERRIDE)
|
||||
class AdminIntegrationTest(SearchTestBase):
|
||||
|
||||
def setUp(self):
|
||||
|
|
@ -600,9 +611,8 @@ class AdminIntegrationTest(SearchTestBase):
|
|||
del self.user
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF="test_watson.urls")
|
||||
@override_settings(**SETTINGS_OVERRIDE)
|
||||
class SiteSearchTest(SearchTestBase):
|
||||
|
||||
def testSiteSearch(self):
|
||||
# Test a search than should find everything.
|
||||
response = self.client.get("/simple/?q=title")
|
||||
|
|
|
|||
Loading…
Reference in a new issue