Define the URL inside setUp because it fails when loading the test
When loading this test from outside (readthedocsinc) the ``reverse``
can't be calculated because the ``search`` name is not defined in the URLConf.
+# -*- coding: utf-8 -*-
+
import pytest
from django.core.management import call_command
from django.core.urlresolvers import reverse
@@ -12,8 +14,11 @@ from readthedocs.search.tests.utils import get_search_query_from_project_file
@pytest.mark.django_db
@pytest.mark.search
+@pytest.mark.community
class TestElasticSearch(object):
- url = reverse('search')
+
+ def setUp(self):
+ self.url = reverse('search')
def _reindex_elasticsearch(self, es_index):
call_command('reindex_elasticsearch')
