示例#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
文件: __init__.py 项目: almet/zamboni
 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()