1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
|
From d362c7b19b96d362c91e754220245d197343943b Mon Sep 17 00:00:00 2001
From: TANIGUCHI Takaki <takaki@asis.media-as.org>
Date: Tue, 24 Nov 2015 21:34:20 +0900
Subject: Don't use duplicated modules (in tests)
---
tests/integration/test_glacier.py | 2 +-
tests/integration/test_s3.py | 8 ++++----
tests/integration/test_smoke.py | 6 +++---
tests/unit/auth/test_signers.py | 2 +-
tests/unit/response_parsing/test_response_parsing.py | 2 +-
tests/unit/test_awsrequest.py | 2 +-
tests/unit/test_endpoint.py | 2 +-
tests/unit/test_response.py | 2 +-
tests/unit/test_retryhandler.py | 4 ++--
tests/unit/test_utils.py | 2 +-
10 files changed, 16 insertions(+), 16 deletions(-)
Index: python-botocore/tests/integration/test_glacier.py
===================================================================
--- python-botocore.orig/tests/integration/test_glacier.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/integration/test_glacier.py 2016-11-10 11:30:36.066944449 +0900
@@ -13,7 +13,7 @@
from tests import unittest
from botocore.exceptions import ClientError
-from botocore.vendored import six
+import six
import botocore.session
Index: python-botocore/tests/integration/test_s3.py
===================================================================
--- python-botocore.orig/tests/integration/test_s3.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/integration/test_s3.py 2016-11-10 11:30:36.066944449 +0900
@@ -24,13 +24,13 @@
from nose.plugins.attrib import attr
-from botocore.vendored.requests import adapters
-from botocore.vendored.requests.exceptions import ConnectionError
+from requests import adapters
+from requests.exceptions import ConnectionError
from botocore.compat import six, zip_longest
import botocore.session
import botocore.auth
import botocore.credentials
-import botocore.vendored.requests as requests
+import requests
from botocore.config import Config
from botocore.exceptions import ClientError
@@ -777,7 +777,7 @@
raise ConnectionError("Simulated ConnectionError raised.")
else:
return original_send(self, *args, **kwargs)
- with mock.patch('botocore.vendored.requests.adapters.HTTPAdapter.send',
+ with mock.patch('requests.adapters.HTTPAdapter.send',
mock_http_adapter_send):
response = self.client.put_object(Bucket=self.bucket_name,
Key='foo.txt', Body=body)
Index: python-botocore/tests/integration/test_smoke.py
===================================================================
--- python-botocore.orig/tests/integration/test_smoke.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/integration/test_smoke.py 2016-11-10 11:30:36.066944449 +0900
@@ -19,8 +19,8 @@
from botocore import xform_name
import botocore.session
from botocore.client import ClientError
-from botocore.vendored.requests import adapters
-from botocore.vendored.requests.exceptions import ConnectionError
+from requests import adapters
+from requests.exceptions import ConnectionError
# Mapping of service -> api calls to try.
@@ -292,7 +292,7 @@
raise ConnectionError("Simulated ConnectionError raised.")
else:
return original_send(self, *args, **kwargs)
- with mock.patch('botocore.vendored.requests.adapters.HTTPAdapter.send',
+ with mock.patch('requests.adapters.HTTPAdapter.send',
mock_http_adapter_send):
try:
response = operation(**kwargs)
Index: python-botocore/tests/unit/auth/test_signers.py
===================================================================
--- python-botocore.orig/tests/unit/auth/test_signers.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/unit/auth/test_signers.py 2016-11-10 11:30:36.066944449 +0900
@@ -25,7 +25,7 @@
import botocore.credentials
from botocore.compat import HTTPHeaders, urlsplit, parse_qs, six
from botocore.awsrequest import AWSRequest
-from botocore.vendored.requests.models import Request
+from requests.models import Request
class BaseTestWithFixedDate(unittest.TestCase):
Index: python-botocore/tests/unit/response_parsing/test_response_parsing.py
===================================================================
--- python-botocore.orig/tests/unit/response_parsing/test_response_parsing.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/unit/response_parsing/test_response_parsing.py 2016-11-10 11:30:36.066944449 +0900
@@ -20,7 +20,7 @@
from tests import unittest, create_session
from mock import Mock
-from botocore.vendored.requests.structures import CaseInsensitiveDict
+from requests.structures import CaseInsensitiveDict
import botocore.session
from botocore import xform_name
Index: python-botocore/tests/unit/test_awsrequest.py
===================================================================
--- python-botocore.orig/tests/unit/test_awsrequest.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/unit/test_awsrequest.py 2016-11-10 11:30:36.066944449 +0900
@@ -418,7 +418,7 @@
conn.sock = s
# Test that the standard library method was used by patching out
# the ``_tunnel`` method and seeing if the std lib method was called.
- with patch('botocore.vendored.requests.packages.urllib3.connection.'
+ with patch('requests.packages.urllib3.connection.'
'HTTPConnection._tunnel') as mock_tunnel:
conn._tunnel()
self.assertTrue(mock_tunnel.called)
Index: python-botocore/tests/unit/test_endpoint.py
===================================================================
--- python-botocore.orig/tests/unit/test_endpoint.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/unit/test_endpoint.py 2016-11-10 11:30:36.066944449 +0900
@@ -15,7 +15,7 @@
from mock import Mock, patch, sentinel
from nose.tools import assert_equals
-from botocore.vendored.requests import ConnectionError
+from requests import ConnectionError
from botocore.compat import six
from botocore.awsrequest import AWSRequest
Index: python-botocore/tests/unit/test_response.py
===================================================================
--- python-botocore.orig/tests/unit/test_response.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/unit/test_response.py 2016-11-10 11:30:36.066944449 +0900
@@ -20,7 +20,7 @@
from botocore import response
from botocore.compat import six
from botocore.exceptions import IncompleteReadError
-from botocore.vendored.requests.models import Response, Request
+from requests.models import Response, Request
XMLBODY1 = (b'<?xml version="1.0" encoding="UTF-8"?><Error>'
b'<Code>AccessDenied</Code>'
Index: python-botocore/tests/unit/test_retryhandler.py
===================================================================
--- python-botocore.orig/tests/unit/test_retryhandler.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/unit/test_retryhandler.py 2016-11-10 11:30:36.066944449 +0900
@@ -16,8 +16,8 @@
from tests import unittest
import mock
-from botocore.vendored.requests import ConnectionError, Timeout
-from botocore.vendored.requests.packages.urllib3.exceptions import ClosedPoolError
+from requests import ConnectionError, Timeout
+from urllib3.exceptions import ClosedPoolError
from botocore import retryhandler
from botocore.exceptions import ChecksumError
Index: python-botocore/tests/unit/test_utils.py
===================================================================
--- python-botocore.orig/tests/unit/test_utils.py 2016-11-10 11:30:36.074944538 +0900
+++ python-botocore/tests/unit/test_utils.py 2016-11-10 11:30:36.066944449 +0900
@@ -25,7 +25,7 @@
from botocore.exceptions import ClientError
from botocore.exceptions import InvalidDNSNameError, MetadataRetrievalError
from botocore.model import ServiceModel
-from botocore.vendored import requests
+import requests
from botocore.utils import remove_dot_segments
from botocore.utils import normalize_url_path
from botocore.utils import validate_jmespath_for_set
|