コード例 #1
0
 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
コード例 #2
0
ファイル: __init__.py プロジェクト: MayankR/addons-server
 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