diff --git a/tests/integration/test_boto3.py b/tests/integration/test_boto3.py index 85ec59fa..cff712a8 100644 --- a/tests/integration/test_boto3.py +++ b/tests/integration/test_boto3.py @@ -83,7 +83,6 @@ def test_boto_vendored_stubs(tmpdir): "https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions", ) def test_boto_medium_difficulty(tmpdir, get_user): - with vcr.use_cassette(str(tmpdir.join("boto3-medium.yml"))): response = get_user() assert response["User"]["UserName"] == IAM_USER_NAME diff --git a/tests/integration/test_matchers.py b/tests/integration/test_matchers.py index 93d61b16..488eb8da 100644 --- a/tests/integration/test_matchers.py +++ b/tests/integration/test_matchers.py @@ -36,7 +36,6 @@ def cassette(tmpdir, httpbin, httpbin_secure): ], ) def test_matchers(httpbin, httpbin_secure, cassette, matcher, matching_uri, not_matching_uri): - matching_uri = _replace_httpbin(matching_uri, httpbin, httpbin_secure) not_matching_uri = _replace_httpbin(not_matching_uri, httpbin, httpbin_secure) default_uri = _replace_httpbin(DEFAULT_URI, httpbin, httpbin_secure) @@ -76,7 +75,6 @@ def test_method_matcher(cassette, httpbin, httpbin_secure): "uri", [DEFAULT_URI, "http://httpbin.org/get?p2=q2&p1=q1", "http://httpbin.org/get?p2=q2&p1=q1"] ) def test_default_matcher_matches(cassette, uri, httpbin, httpbin_secure): - uri = _replace_httpbin(uri, httpbin, httpbin_secure) with vcr.use_cassette(cassette) as cass: diff --git a/tests/unit/test_request.py b/tests/unit/test_request.py index 54e82c1a..b29baa2f 100644 --- a/tests/unit/test_request.py +++ b/tests/unit/test_request.py @@ -60,7 +60,6 @@ def test_uri(method, uri): def test_HeadersDict(): - # Simple test of CaseInsensitiveDict h = HeadersDict() assert h == {} diff --git a/tests/unit/test_vcr_import.py b/tests/unit/test_vcr_import.py index 5872010a..e3a8c60d 100644 --- a/tests/unit/test_vcr_import.py +++ b/tests/unit/test_vcr_import.py @@ -2,7 +2,6 @@ def test_vcr_import_deprecation(recwarn): - if "vcr" in sys.modules: # Remove imported module entry if already loaded in another test del sys.modules["vcr"] diff --git a/tox.ini b/tox.ini index a3f2ed6c..6c2d555c 100644 --- a/tox.ini +++ b/tox.ini @@ -40,7 +40,7 @@ commands = isort --version isort . --check --diff flake8 --version - flake8 --exclude=./docs/conf.py,./.tox/ + flake8 --exclude=./docs/conf.py,./.tox/,./venv/ pyflakes ./docs/conf.py deps = flake8 @@ -75,6 +75,8 @@ basepython = python3.7 usedevelop=true commands = ./runtests.sh --cov=./vcr --cov-branch --cov-report=xml --cov-append {posargs} +allowlist_externals = + ./runtests.sh deps = Werkzeug==2.0.3 pytest @@ -83,8 +85,9 @@ deps = PyYAML ipaddress requests: requests>=2.22.0 + requests: urllib3<2 httplib2: httplib2 - urllib3: urllib3 + urllib3: urllib3<2 boto3: boto3 boto3: urllib3 aiohttp: aiohttp diff --git a/vcr/patch.py b/vcr/patch.py index 9399e3b7..a283287f 100644 --- a/vcr/patch.py +++ b/vcr/patch.py @@ -199,7 +199,6 @@ def _requests(self): @_build_patchers_from_mock_triples_decorator def _boto3(self): - try: # botocore using awsrequest import botocore.awsrequest as cpool diff --git a/vcr/stubs/compat.py b/vcr/stubs/compat.py index d72218f0..bac79d8f 100644 --- a/vcr/stubs/compat.py +++ b/vcr/stubs/compat.py @@ -12,7 +12,7 @@ def get_header(message, name): def get_header_items(message): - for (key, values) in get_headers(message): + for key, values in get_headers(message): for value in values: yield key, value diff --git a/vcr/stubs/httplib2_stubs.py b/vcr/stubs/httplib2_stubs.py index fd126833..66cb0d29 100644 --- a/vcr/stubs/httplib2_stubs.py +++ b/vcr/stubs/httplib2_stubs.py @@ -28,7 +28,6 @@ class VCRHTTPSConnectionWithTimeout(VCRHTTPSConnection, HTTPSConnectionWithTimeo _baseclass = HTTPSConnectionWithTimeout def __init__(self, *args, **kwargs): - # Delete the keyword arguments that HTTPSConnection would not recognize safe_keys = { "host",