Beispiel #1
0
 def mock_perform_request(_request):
   raise net.ConnectionError()
Beispiel #2
0
 def mock_perform_request(request):
     params = dict(request.params)
     if params.get(net.COUNT_KEY) != 1:
         raise net.ConnectionError()
     return request.make_fake_response(response)
Beispiel #3
0
 def mock_perform_request(request):
   attempts.append(request)
   if len(attempts) == 1:
     raise net.ConnectionError()
   return net_utils.make_fake_response(response, request.get_full_url())
Beispiel #4
0
 def mock_perform_request(request):
     attempts.append(request)
     if len(attempts) == 1:
         raise net.ConnectionError()
     return request.make_fake_response(response)