Ejemplo n.º 1
0
 def mock_http_adapter_send(self, *args, **kwargs):
     if not getattr(self, '_integ_test_error_raised', False):
         self._integ_test_error_raised = True
         raise ConnectionError("Simulated ConnectionError raised.")
     else:
         return original_send(self, *args, **kwargs)
Ejemplo n.º 2
0
 def mock_http_adapter_send(self, *args, **kwargs):
     if not state.error_raised:
         state.error_raised = True
         raise ConnectionError("Simulated ConnectionError raised.")
     else:
         return original_send(self, *args, **kwargs)