mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Add isort to code lint
This commit is contained in:
@@ -1,2 +1,9 @@
|
||||
[tool.black]
|
||||
line-length=110
|
||||
|
||||
[tool.isort]
|
||||
line_length = 110
|
||||
known_first_party = "vcrpy"
|
||||
multi_line_output = 3
|
||||
use_parentheses = true
|
||||
include_trailing_comma = true
|
||||
|
||||
2
setup.py
2
setup.py
@@ -5,7 +5,7 @@ import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools import find_packages, setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
long_description = open("README.rst", "r").read()
|
||||
|
||||
@@ -8,6 +8,7 @@ asyncio = pytest.importorskip("asyncio")
|
||||
aiohttp = pytest.importorskip("aiohttp")
|
||||
|
||||
import vcr # noqa: E402
|
||||
|
||||
from .aiohttp_utils import aiohttp_app, aiohttp_request # noqa: E402
|
||||
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ import pytest
|
||||
|
||||
boto = pytest.importorskip("boto")
|
||||
|
||||
from configparser import DuplicateSectionError # NOQA
|
||||
|
||||
import boto # NOQA
|
||||
import boto.iam # NOQA
|
||||
from boto.s3.connection import S3Connection # NOQA
|
||||
from boto.s3.key import Key # NOQA
|
||||
from configparser import DuplicateSectionError # NOQA
|
||||
|
||||
import vcr # NOQA
|
||||
|
||||
|
||||
@@ -15,6 +17,7 @@ def test_boto_stubs(tmpdir):
|
||||
# Perform the imports within the patched context so that
|
||||
# CertValidatingHTTPSConnection refers to the patched version.
|
||||
from boto.https_connection import CertValidatingHTTPSConnection
|
||||
|
||||
from vcr.stubs.boto_stubs import VCRCertValidatingHTTPSConnection
|
||||
|
||||
# Prove that the class was patched by the stub and that we can instantiate it.
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import pytest
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
boto3 = pytest.importorskip("boto3")
|
||||
|
||||
import boto3 # NOQA
|
||||
import botocore # NOQA
|
||||
|
||||
import vcr # NOQA
|
||||
|
||||
try:
|
||||
@@ -64,6 +66,7 @@ def test_boto_vendored_stubs(tmpdir):
|
||||
HTTPConnection,
|
||||
VerifiedHTTPSConnection,
|
||||
)
|
||||
|
||||
from vcr.stubs.boto3_stubs import VCRRequestsHTTPConnection, VCRRequestsHTTPSConnection
|
||||
|
||||
# Prove that the class was patched by the stub and that we can instantiate it.
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import os
|
||||
import json
|
||||
import pytest
|
||||
import vcr
|
||||
import os
|
||||
from urllib.request import urlopen
|
||||
|
||||
import pytest
|
||||
|
||||
import vcr
|
||||
|
||||
|
||||
def test_set_serializer_default_config(tmpdir, httpbin):
|
||||
my_vcr = vcr.VCR(serializer="json")
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import base64
|
||||
import pytest
|
||||
from urllib.request import urlopen, Request
|
||||
from urllib.parse import urlencode
|
||||
from urllib.error import HTTPError
|
||||
import vcr
|
||||
import json
|
||||
from urllib.error import HTTPError
|
||||
from urllib.parse import urlencode
|
||||
from urllib.request import Request, urlopen
|
||||
|
||||
import pytest
|
||||
from assertions import assert_cassette_has_one_response, assert_is_json
|
||||
|
||||
import vcr
|
||||
|
||||
|
||||
def _request_with_auth(url, username, password):
|
||||
request = Request(url)
|
||||
|
||||
@@ -2,15 +2,14 @@
|
||||
"""Integration tests with httplib2"""
|
||||
|
||||
import sys
|
||||
|
||||
from urllib.parse import urlencode
|
||||
|
||||
import pytest
|
||||
import pytest_httpbin.certs
|
||||
from assertions import assert_cassette_has_one_response
|
||||
|
||||
import vcr
|
||||
|
||||
from assertions import assert_cassette_has_one_response
|
||||
|
||||
httplib2 = pytest.importorskip("httplib2")
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import pytest
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
asyncio = pytest.importorskip("asyncio")
|
||||
httpx = pytest.importorskip("httpx")
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from urllib.request import urlopen
|
||||
import socket
|
||||
from contextlib import contextmanager
|
||||
from urllib.request import urlopen
|
||||
|
||||
import vcr
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import vcr
|
||||
import pytest
|
||||
from urllib.request import urlopen
|
||||
|
||||
import pytest
|
||||
|
||||
import vcr
|
||||
|
||||
DEFAULT_URI = "http://httpbin.org/get?p1=q1&p2=q2" # base uri for testing
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import pytest
|
||||
import vcr
|
||||
from urllib.request import urlopen
|
||||
|
||||
import pytest
|
||||
|
||||
import vcr
|
||||
|
||||
|
||||
def test_making_extra_request_raises_exception(tmpdir, httpbin):
|
||||
# make two requests in the first request that are considered
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Test using a proxy."""
|
||||
|
||||
# External imports
|
||||
import multiprocessing
|
||||
import pytest
|
||||
|
||||
import http.server
|
||||
import multiprocessing
|
||||
import socketserver
|
||||
from urllib.request import urlopen
|
||||
|
||||
# Internal imports
|
||||
import pytest
|
||||
|
||||
import vcr
|
||||
|
||||
# Conditional imports
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import pytest
|
||||
import vcr
|
||||
from urllib.request import urlopen
|
||||
|
||||
import pytest
|
||||
|
||||
import vcr
|
||||
|
||||
|
||||
def test_once_record_mode(tmpdir, httpbin):
|
||||
testfile = str(tmpdir.join("recordmode.yml"))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import vcr
|
||||
from urllib.request import urlopen
|
||||
|
||||
import vcr
|
||||
|
||||
|
||||
def true_matcher(r1, r2):
|
||||
return True
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import vcr
|
||||
from urllib.request import urlopen
|
||||
|
||||
import vcr
|
||||
|
||||
|
||||
def test_recorded_request_uri_with_redirected_request(tmpdir, httpbin):
|
||||
with vcr.use_cassette(str(tmpdir.join("test.yml"))) as cass:
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
"""Test requests' interaction with vcr"""
|
||||
import pytest
|
||||
import vcr
|
||||
from assertions import assert_cassette_empty, assert_is_json
|
||||
|
||||
import vcr
|
||||
|
||||
requests = pytest.importorskip("requests")
|
||||
from requests.exceptions import ConnectionError # noqa E402
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import vcr
|
||||
import zlib
|
||||
import json
|
||||
import http.client as httplib
|
||||
import json
|
||||
import zlib
|
||||
|
||||
from assertions import assert_is_json
|
||||
|
||||
import vcr
|
||||
|
||||
|
||||
def _headers_are_case_insensitive(host, port):
|
||||
conn = httplib.HTTPConnection(host, port)
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
import json
|
||||
|
||||
import pytest
|
||||
from assertions import assert_cassette_empty, assert_is_json
|
||||
|
||||
import vcr
|
||||
from vcr.errors import CannotOverwriteExistingCassetteException
|
||||
|
||||
from assertions import assert_cassette_empty, assert_is_json
|
||||
|
||||
tornado = pytest.importorskip("tornado")
|
||||
http = pytest.importorskip("tornado.httpclient")
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
"""Integration tests with urllib2"""
|
||||
|
||||
import ssl
|
||||
from urllib.request import urlopen
|
||||
from urllib.parse import urlencode
|
||||
from urllib.request import urlopen
|
||||
|
||||
import pytest_httpbin.certs
|
||||
from assertions import assert_cassette_has_one_response
|
||||
|
||||
# Internal imports
|
||||
import vcr
|
||||
|
||||
from assertions import assert_cassette_has_one_response
|
||||
|
||||
|
||||
def urlopen_with_cafile(*args, **kwargs):
|
||||
context = ssl.create_default_context(cafile=pytest_httpbin.certs.where())
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
|
||||
import pytest
|
||||
import pytest_httpbin
|
||||
from assertions import assert_cassette_empty, assert_is_json
|
||||
|
||||
import vcr
|
||||
from vcr.patch import force_reset
|
||||
from assertions import assert_cassette_empty, assert_is_json
|
||||
|
||||
urllib3 = pytest.importorskip("urllib3")
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import http.client as httplib
|
||||
import multiprocessing
|
||||
import pytest
|
||||
from xmlrpc.client import ServerProxy
|
||||
from xmlrpc.server import SimpleXMLRPCServer
|
||||
|
||||
import pytest
|
||||
|
||||
requests = pytest.importorskip("requests")
|
||||
|
||||
import vcr # NOQA
|
||||
|
||||
@@ -7,6 +7,7 @@ from unittest import mock
|
||||
|
||||
import pytest
|
||||
import yaml
|
||||
|
||||
from vcr.cassette import Cassette
|
||||
from vcr.errors import UnhandledHTTPRequestError
|
||||
from vcr.patch import force_reset
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
from io import BytesIO
|
||||
from vcr.filters import (
|
||||
remove_headers,
|
||||
replace_headers,
|
||||
remove_query_parameters,
|
||||
replace_query_parameters,
|
||||
remove_post_data_parameters,
|
||||
replace_post_data_parameters,
|
||||
decode_response,
|
||||
)
|
||||
from vcr.request import Request
|
||||
import gzip
|
||||
import json
|
||||
from unittest import mock
|
||||
import zlib
|
||||
from io import BytesIO
|
||||
from unittest import mock
|
||||
|
||||
from vcr.filters import (
|
||||
decode_response,
|
||||
remove_headers,
|
||||
remove_post_data_parameters,
|
||||
remove_query_parameters,
|
||||
replace_headers,
|
||||
replace_post_data_parameters,
|
||||
replace_query_parameters,
|
||||
)
|
||||
from vcr.request import Request
|
||||
|
||||
|
||||
def test_replace_headers():
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import pytest
|
||||
from vcr.serializers.jsonserializer import serialize
|
||||
|
||||
from vcr.request import Request
|
||||
from vcr.serializers.jsonserializer import serialize
|
||||
|
||||
|
||||
def test_serialize_binary():
|
||||
|
||||
@@ -3,8 +3,7 @@ from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from vcr import matchers
|
||||
from vcr import request
|
||||
from vcr import matchers, request
|
||||
|
||||
# the dict contains requests with corresponding to its key difference
|
||||
# with 'base' request.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import filecmp
|
||||
import json
|
||||
import shutil
|
||||
|
||||
import yaml
|
||||
|
||||
import vcr.migration
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from vcr.request import Request, HeadersDict
|
||||
from vcr.request import HeadersDict, Request
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
@@ -5,7 +5,7 @@ import pytest
|
||||
|
||||
from vcr.request import Request
|
||||
from vcr.serialize import deserialize, serialize
|
||||
from vcr.serializers import yamlserializer, jsonserializer, compat
|
||||
from vcr.serializers import compat, jsonserializer, yamlserializer
|
||||
|
||||
|
||||
def test_deserialize_old_yaml_cassette():
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from unittest import mock
|
||||
|
||||
from vcr import mode
|
||||
from vcr.stubs import VCRHTTPSConnection
|
||||
from vcr.cassette import Cassette
|
||||
from vcr.stubs import VCRHTTPSConnection
|
||||
|
||||
|
||||
class TestVCRConnection:
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
from unittest import mock
|
||||
import http.client as httplib
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
import http.client as httplib
|
||||
|
||||
from vcr import VCR, mode, use_cassette
|
||||
from vcr.patch import _HTTPConnection, force_reset
|
||||
from vcr.request import Request
|
||||
from vcr.stubs import VCRHTTPSConnection
|
||||
from vcr.patch import _HTTPConnection, force_reset
|
||||
|
||||
|
||||
def test_vcr_use_cassette():
|
||||
|
||||
5
tox.ini
5
tox.ini
@@ -36,13 +36,16 @@ skipsdist = True
|
||||
commands =
|
||||
black --version
|
||||
black --check --diff .
|
||||
isort --version
|
||||
isort . --check --diff
|
||||
flake8 --version
|
||||
flake8 --exclude=./docs/conf.py,./.tox/
|
||||
pyflakes ./docs/conf.py
|
||||
deps =
|
||||
flake8
|
||||
black
|
||||
basepython = python3.7
|
||||
isort
|
||||
basepython = python3.10
|
||||
|
||||
[testenv:docs]
|
||||
# Running sphinx from inside the "docs" directory
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import logging
|
||||
from .config import VCR
|
||||
from logging import NullHandler
|
||||
|
||||
from .config import VCR
|
||||
from .record_mode import RecordMode as mode # noqa import is not used in this file
|
||||
|
||||
__version__ = "4.2.1"
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import collections
|
||||
import contextlib
|
||||
import copy
|
||||
import sys
|
||||
import inspect
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import wrapt
|
||||
|
||||
from .errors import UnhandledHTTPRequestError
|
||||
from .matchers import requests_match, uri, method, get_matchers_results
|
||||
from .patch import CassettePatcherBuilder
|
||||
from .serializers import yamlserializer
|
||||
from .persisters.filesystem import FilesystemPersister
|
||||
from .util import partition_dict
|
||||
from ._handle_coroutine import handle_coroutine
|
||||
from .errors import UnhandledHTTPRequestError
|
||||
from .matchers import get_matchers_results, method, requests_match, uri
|
||||
from .patch import CassettePatcherBuilder
|
||||
from .persisters.filesystem import FilesystemPersister
|
||||
from .record_mode import RecordMode
|
||||
from .serializers import yamlserializer
|
||||
from .util import partition_dict
|
||||
|
||||
try:
|
||||
from asyncio import iscoroutinefunction
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
import copy
|
||||
|
||||
from collections import abc as collections_abc
|
||||
import functools
|
||||
import inspect
|
||||
import os
|
||||
import types
|
||||
from collections import abc as collections_abc
|
||||
|
||||
import six
|
||||
|
||||
from . import filters, matchers
|
||||
from .cassette import Cassette
|
||||
from .serializers import yamlserializer, jsonserializer
|
||||
from .persisters.filesystem import FilesystemPersister
|
||||
from .util import compose, auto_decorate
|
||||
from .record_mode import RecordMode
|
||||
from . import matchers
|
||||
from . import filters
|
||||
from .serializers import jsonserializer, yamlserializer
|
||||
from .util import auto_decorate, compose
|
||||
|
||||
|
||||
class VCR:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from io import BytesIO
|
||||
from urllib.parse import urlparse, urlencode, urlunparse
|
||||
import copy
|
||||
import json
|
||||
import zlib
|
||||
from io import BytesIO
|
||||
from urllib.parse import urlencode, urlparse, urlunparse
|
||||
|
||||
from .util import CaseInsensitiveDict
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import json
|
||||
import logging
|
||||
import urllib
|
||||
import xmlrpc.client
|
||||
from .util import read_body
|
||||
import logging
|
||||
|
||||
from .util import read_body
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -17,11 +17,12 @@ import os
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
import yaml
|
||||
|
||||
from .serializers import yamlserializer, jsonserializer
|
||||
from .serialize import serialize
|
||||
from . import request
|
||||
from .serialize import serialize
|
||||
from .serializers import jsonserializer, yamlserializer
|
||||
from .stubs.compat import get_httpmessage
|
||||
|
||||
# Use the libYAML versions if possible
|
||||
|
||||
10
vcr/patch.py
10
vcr/patch.py
@@ -1,13 +1,12 @@
|
||||
"""Utilities for patching in cassettes"""
|
||||
import contextlib
|
||||
import functools
|
||||
import http.client as httplib
|
||||
import itertools
|
||||
import logging
|
||||
from unittest import mock
|
||||
|
||||
from .stubs import VCRHTTPConnection, VCRHTTPSConnection
|
||||
import http.client as httplib
|
||||
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
# Save some of the original types for the purposes of unpatching
|
||||
@@ -16,7 +15,7 @@ _HTTPSConnection = httplib.HTTPSConnection
|
||||
|
||||
# Try to save the original types for boto3
|
||||
try:
|
||||
from botocore.awsrequest import AWSHTTPSConnection, AWSHTTPConnection
|
||||
from botocore.awsrequest import AWSHTTPConnection, AWSHTTPSConnection
|
||||
except ImportError:
|
||||
try:
|
||||
import botocore.vendored.requests.packages.urllib3.connectionpool as cpool
|
||||
@@ -269,8 +268,7 @@ class CassettePatcherBuilder:
|
||||
except ImportError: # pragma: no cover
|
||||
pass
|
||||
else:
|
||||
from .stubs.httplib2_stubs import VCRHTTPConnectionWithTimeout
|
||||
from .stubs.httplib2_stubs import VCRHTTPSConnectionWithTimeout
|
||||
from .stubs.httplib2_stubs import VCRHTTPConnectionWithTimeout, VCRHTTPSConnectionWithTimeout
|
||||
|
||||
yield cpool, "HTTPConnectionWithTimeout", VCRHTTPConnectionWithTimeout
|
||||
yield cpool, "HTTPSConnectionWithTimeout", VCRHTTPSConnectionWithTimeout
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# .. _persister_example:
|
||||
|
||||
import os
|
||||
from ..serialize import serialize, deserialize
|
||||
|
||||
from ..serialize import deserialize, serialize
|
||||
|
||||
|
||||
class FilesystemPersister:
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import logging
|
||||
import warnings
|
||||
from io import BytesIO
|
||||
from urllib.parse import urlparse, parse_qsl
|
||||
from urllib.parse import parse_qsl, urlparse
|
||||
|
||||
from .util import CaseInsensitiveDict
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from vcr.serializers import compat
|
||||
from vcr.request import Request
|
||||
import yaml
|
||||
|
||||
from vcr.request import Request
|
||||
from vcr.serializers import compat
|
||||
|
||||
# version 1 cassettes started with VCR 1.0.x.
|
||||
# Before 1.0.x, there was no versioning.
|
||||
CASSETTE_FORMAT_VERSION = 1
|
||||
|
||||
@@ -2,9 +2,10 @@ import yaml
|
||||
|
||||
# Use the libYAML versions if possible
|
||||
try:
|
||||
from yaml import CLoader as Loader, CDumper as Dumper
|
||||
from yaml import CDumper as Dumper
|
||||
from yaml import CLoader as Loader
|
||||
except ImportError:
|
||||
from yaml import Loader, Dumper
|
||||
from yaml import Dumper, Loader
|
||||
|
||||
|
||||
def deserialize(cassette_string):
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
"""Stubs for patching HTTP and HTTPS requests"""
|
||||
|
||||
import logging
|
||||
from http.client import (
|
||||
HTTPConnection,
|
||||
HTTPSConnection,
|
||||
HTTPResponse,
|
||||
)
|
||||
from http.client import HTTPConnection, HTTPResponse, HTTPSConnection
|
||||
from io import BytesIO
|
||||
from vcr.request import Request
|
||||
|
||||
from vcr.errors import CannotOverwriteExistingCassetteException
|
||||
from vcr.request import Request
|
||||
|
||||
from . import compat
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
"""Stubs for aiohttp HTTP clients"""
|
||||
import asyncio
|
||||
import functools
|
||||
import logging
|
||||
import json
|
||||
|
||||
from aiohttp import ClientConnectionError, ClientResponse, RequestInfo, streams
|
||||
from aiohttp import hdrs, CookieJar
|
||||
import logging
|
||||
from http.cookies import CookieError, Morsel, SimpleCookie
|
||||
from typing import Mapping, Union
|
||||
|
||||
from aiohttp import ClientConnectionError, ClientResponse, CookieJar, RequestInfo, hdrs, streams
|
||||
from aiohttp.helpers import strip_auth_from_url
|
||||
from multidict import CIMultiDict, CIMultiDictProxy, MultiDict
|
||||
from typing import Union, Mapping
|
||||
from yarl import URL
|
||||
|
||||
from vcr.errors import CannotOverwriteExistingCassetteException
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Stubs for boto"""
|
||||
|
||||
from boto.https_connection import CertValidatingHTTPSConnection
|
||||
|
||||
from ..stubs import VCRHTTPSConnection
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from io import BytesIO
|
||||
import http.client
|
||||
|
||||
from io import BytesIO
|
||||
|
||||
"""
|
||||
The python3 http.client api moved some stuff around, so this is an abstraction
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Stubs for httplib2"""
|
||||
|
||||
from httplib2 import HTTPConnectionWithTimeout, HTTPSConnectionWithTimeout
|
||||
|
||||
from ..stubs import VCRHTTPConnection, VCRHTTPSConnection
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import functools
|
||||
import inspect
|
||||
import logging
|
||||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import httpx
|
||||
from vcr.request import Request as VcrRequest
|
||||
|
||||
from vcr.errors import CannotOverwriteExistingCassetteException
|
||||
import inspect
|
||||
from vcr.request import Request as VcrRequest
|
||||
|
||||
_httpx_signature = inspect.signature(httpx.Client.request)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Stubs for urllib3"""
|
||||
|
||||
from urllib3.connectionpool import HTTPConnection, VerifiedHTTPSConnection
|
||||
|
||||
from ..stubs import VCRHTTPConnection, VCRHTTPSConnection
|
||||
|
||||
# urllib3 defines its own HTTPConnection classes. It includes some polyfills
|
||||
|
||||
Reference in New Issue
Block a user