Skip to content

Commit

Permalink
Removed temporary patch for VCRHTTPResponse version_string from conft…
Browse files Browse the repository at this point in the history
…est.py
gabino committed Dec 30, 2024
1 parent 622e6cf commit 9c10590
Showing 3 changed files with 5 additions and 15 deletions.
3 changes: 3 additions & 0 deletions cuenca/resources/card_transactions.py
Original file line number Diff line number Diff line change
@@ -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

3 changes: 2 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -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
14 changes: 0 additions & 14 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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():

0 comments on commit 9c10590

Please sign in to comment.