From 9c105908bda06b33959c94ecb6a99cb57015c17a Mon Sep 17 00:00:00 2001 From: gabino Date: Mon, 30 Dec 2024 17:55:03 -0600 Subject: [PATCH] Removed temporary patch for VCRHTTPResponse version_string from conftest.py --- cuenca/resources/card_transactions.py | 3 +++ requirements-test.txt | 3 ++- tests/conftest.py | 14 -------------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/cuenca/resources/card_transactions.py b/cuenca/resources/card_transactions.py index 529ffd22..74adb2ff 100644 --- a/cuenca/resources/card_transactions.py +++ b/cuenca/resources/card_transactions.py @@ -14,6 +14,9 @@ class CardTransaction(Transaction): + def __init__(self, *args, **kwargs): + super(CardTransaction, self).__init__(*args, **kwargs) + _resource: ClassVar = 'card_transactions' _query_params: ClassVar = CardTransactionQuery diff --git a/requirements-test.txt b/requirements-test.txt index c39e277b..9d96fdb3 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -9,4 +9,5 @@ pytest-vcr==1.0.* requests-mock==1.9.* types-freezegun==1.1.7 types-requests -vcrpy==6.0.2 +#vcrpy==6.0.2 +git+https://github.com/kevin1024/vcrpy.git@master diff --git a/tests/conftest.py b/tests/conftest.py index ec82faa8..d61b02cc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,20 +9,6 @@ cuenca.configure(sandbox=True) -# Temporary patch for the VCRHTTPResponse object to avoid -# AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' -# Occurs with urllib3>=2.3.0 and is being addressed in the following PR: -# https://github.com/kevin1024/vcrpy/pull/889 - - -@pytest.fixture(autouse=True) -def patch_VCRHTTPResponse_version_string(): - from vcr.stubs import VCRHTTPResponse # type: ignore - - if not hasattr(VCRHTTPResponse, 'version_string'): - VCRHTTPResponse.version_string = None - yield - @pytest.fixture(scope='module') def vcr_config():