| Index: Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
|
| diff --git a/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py b/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
|
| index 67439f0944f4de56e98e5c009cd263d46010c84f..022178f8d0c4ba24a984f844ac7a0944c09da305 100644
|
| --- a/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
|
| +++ b/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
|
| @@ -3,7 +3,7 @@
|
| # Redistribution and use in source and binary forms, with or without
|
| # modification, are permitted provided that the following conditions are
|
| # met:
|
| -#
|
| +#
|
| # * Redistributions of source code must retain the above copyright
|
| # notice, this list of conditions and the following disclaimer.
|
| # * Redistributions in binary form must reproduce the above
|
| @@ -13,7 +13,7 @@
|
| # * Neither the name of Google Inc. nor the names of its
|
| # contributors may be used to endorse or promote products derived from
|
| # this software without specific prior written permission.
|
| -#
|
| +#
|
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| @@ -26,10 +26,11 @@
|
| # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -import unittest2 as unittest
|
|
|
| from webkitpy.common.net.networktransaction import NetworkTransaction, NetworkTimeout
|
| from webkitpy.common.system.logtesting import LoggingTestCase
|
| +from webkitpy.thirdparty import unittest2 as unittest
|
| +from webkitpy.thirdparty.mechanize import HTTPError
|
|
|
|
|
| class NetworkTransactionTest(LoggingTestCase):
|
| @@ -58,12 +59,10 @@ class NetworkTransactionTest(LoggingTestCase):
|
| 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
|
|
|
| def _raise_404_error(self):
|
| - from webkitpy.thirdparty.autoinstalled.mechanize import HTTPError
|
| raise HTTPError("http://foo.com/", 404, "not found", None, None)
|
|
|
| def test_retry(self):
|
|
|