def setUpClass(cls): if cls.mock_es: start_es_mock() try: reset.send(None) # Reset all the ES tasks on hold. super(MockEsMixin, cls).setUpClass() except Exception: # We need to unpatch here because tearDownClass will not be # called. if cls.mock_es: stop_es_mock() raise
def setUpClass(cls): if cls.mock_es: Mocked_ES.start() try: reset.send(None) # Reset all the ES tasks on hold. super(MockEsMixin, cls).setUpClass() except Exception: # We need to unpatch here because tearDownClass will not be # called. if cls.mock_es: Mocked_ES.stop() raise