Пример #1
0
 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
Пример #2
0
 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
Пример #3
0
 def setUpClass(cls):
     if cls.mock_es:
         start_es_mock()
     try:
         reset.send(None)  # Reset all the ES tasks on hold.
         super(TestCase, cls).setUpClass()
     except Exception:
         # We need to unpatch here because tearDownClass will not be
         # called.
         if cls.mock_es:
             stop_es_mock()
         raise
Пример #4
0
 def setUpClass(cls):
     if cls.mock_es:
         start_es_mock()
     try:
         reset.send(None)  # Reset all the ES tasks on hold.
         super(TestCase, cls).setUpClass()
     except Exception:
         # We need to unpatch here because tearDownClass will not be
         # called.
         if cls.mock_es:
             stop_es_mock()
         raise
Пример #5
0
 def setUpClass(cls):
     if cls.mock_es:
         [p.start() for p in ES_patchers]
     reset.send(None)  # Reset all the ES tasks on hold.
     super(TestCase, cls).setUpClass()
Пример #6
0
 def setUpClass(cls):
     if cls.mock_es:
         [p.start() for p in ES_patchers]
     reset.send(None)  # Reset all the ES tasks on hold.
     super(TestCase, cls).setUpClass()