Exemple #1
0
    def tearDownClass(cls):

        destroy_extra_tables()

        if SphinxTestCase.sphinx_is_running:
            stop_sphinx()
            SphinxTestCase.sphinx_is_running = False
Exemple #2
0
 def test_sphinx_off(self):
     """
     This tests that if sphinx is turned off that you will get an error.
     """
     # Shut down sphinx if it's configured.
     if settings.SPHINX_SEARCHD and settings.SPHINX_INDEXER:
         stop_sphinx()
     response = self.client.get("/en-US/firefox/api/1.2/search/foo")
     self.assertContains(response, "Could not connect to Sphinx search.",
                         status_code=503)
Exemple #3
0
    def test_sphinx_off(self):
        """
        This tests that if sphinx is turned off that you will get an error.
        """
        # Shut down sphinx if it's configured.
        if settings.SPHINX_SEARCHD and settings.SPHINX_INDEXER:
            stop_sphinx()

        os.environ['DJANGO_ENVIRONMENT'] = 'test'
        response = self.client.get("/en-US/firefox/api/1.2/search/foo")
        self.assertContains(response, "Could not connect to Sphinx search.",
                            status_code=503)
Exemple #4
0
 def tearDownClass(cls):
     stop_sphinx()
     super(SphinxTestCase, cls).tearDownClass()
Exemple #5
0
 def tearDownClass(cls):
     if SphinxTestCase.sphinx_is_running:
         stop_sphinx()
         SphinxTestCase.sphinx_is_running = False
 def teardown_class(cls):
     stop_sphinx()
     super(SphinxTestCase, cls).teardown_class()
Exemple #7
0
 def tearDownClass(cls):
     if SphinxTestCase.sphinx_is_running:
         stop_sphinx()
         SphinxTestCase.sphinx_is_running = False
Exemple #8
0
 def tearDownClass(cls):
     stop_sphinx()
     super(SphinxTestCase, cls).tearDownClass()
Exemple #9
0
 def tearDownClass(cls):
     super(SphinxTestCase, cls).tearDownClass()
     if SphinxTestCase.sphinx_is_running:
         stop_sphinx()
         SphinxTestCase.sphinx_is_running = False
Exemple #10
0
 def handle_noargs(self, **options):
     stop_sphinx()
Exemple #11
0
 def teardown_class(cls):
     stop_sphinx()
     super(SphinxTestCase, cls).teardown_class()
Exemple #12
0
 def handle_noargs(self, *args, **kwargs):
     stop_sphinx()
Exemple #13
0
 def tearDownClass(cls):
     super(SphinxTestCase, cls).tearDownClass()
     if SphinxTestCase.sphinx_is_running:
         stop_sphinx()
         SphinxTestCase.sphinx_is_running = False
Exemple #14
0
 def tearDownClass(cls):
     super(SphinxTestCase, cls).tearDownClass()
     if not cls.skipme:
         stop_sphinx()