mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Fix patch of FliesystemPersister.load_cassette
This commit is contained in:
@@ -86,7 +86,7 @@ def make_get_request():
|
|||||||
|
|
||||||
@mock.patch('vcr.cassette.requests_match', return_value=True)
|
@mock.patch('vcr.cassette.requests_match', return_value=True)
|
||||||
@mock.patch('vcr.cassette.FilesystemPersister.load_cassette',
|
@mock.patch('vcr.cassette.FilesystemPersister.load_cassette',
|
||||||
lambda *args, **kwargs: (('foo',), (mock.MagicMock(),)))
|
classmethod(lambda *args, **kwargs: (('foo',), (mock.MagicMock(),))))
|
||||||
@mock.patch('vcr.cassette.Cassette.can_play_response_for', return_value=True)
|
@mock.patch('vcr.cassette.Cassette.can_play_response_for', return_value=True)
|
||||||
@mock.patch('vcr.stubs.VCRHTTPResponse')
|
@mock.patch('vcr.stubs.VCRHTTPResponse')
|
||||||
def test_function_decorated_with_use_cassette_can_be_invoked_multiple_times(*args):
|
def test_function_decorated_with_use_cassette_can_be_invoked_multiple_times(*args):
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ from ..serialize import serialize, deserialize
|
|||||||
|
|
||||||
|
|
||||||
class FilesystemPersister(object):
|
class FilesystemPersister(object):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def load_cassette(cls, cassette_path, serializer):
|
def load_cassette(cls, cassette_path, serializer):
|
||||||
with open(cassette_path) as f:
|
with open(cassette_path) as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user