def _raise_500_error(self):
     self._run_count += 1
     if self._run_count < 3:
         from webkitpy.thirdparty.autoinstalled.mechanize import HTTPError
         raise HTTPError("http://example.com/", 500,
                         "internal server error", None, None)
     return 42
Example #2
0
 def _raise_404_error(self):
     from webkitpy.thirdparty.autoinstalled.mechanize import HTTPError
     raise HTTPError("http://foo.com/", 404, "not found", None, None)
 def _raise_http_error(self):
     self._run_count += 1
     if self._run_count < 3:
         raise HTTPError("http://example.com/", 500,
                         "inteneral server error", None, None)
     return 42
 def _raise_404_error(self):
     raise HTTPError("http://foo.com/", 404, "not found", None, None)