def tearDownClass(cls): destroy_extra_tables() if SphinxTestCase.sphinx_is_running: stop_sphinx() SphinxTestCase.sphinx_is_running = False
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)
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)
def tearDownClass(cls): stop_sphinx() super(SphinxTestCase, cls).tearDownClass()
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()
def tearDownClass(cls): if SphinxTestCase.sphinx_is_running: stop_sphinx() SphinxTestCase.sphinx_is_running = False
def tearDownClass(cls): stop_sphinx() super(SphinxTestCase, cls).tearDownClass()
def tearDownClass(cls): super(SphinxTestCase, cls).tearDownClass() if SphinxTestCase.sphinx_is_running: stop_sphinx() SphinxTestCase.sphinx_is_running = False
def handle_noargs(self, **options): stop_sphinx()
def teardown_class(cls): stop_sphinx() super(SphinxTestCase, cls).teardown_class()
def handle_noargs(self, *args, **kwargs): stop_sphinx()
def tearDownClass(cls): super(SphinxTestCase, cls).tearDownClass() if SphinxTestCase.sphinx_is_running: stop_sphinx() SphinxTestCase.sphinx_is_running = False
def tearDownClass(cls): super(SphinxTestCase, cls).tearDownClass() if not cls.skipme: stop_sphinx()