1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Fix patch of FliesystemPersister.load_cassette

This commit is contained in:
Ivan Malison
2017-01-13 15:29:45 -08:00
parent a033bc729c
commit 06b00837fc
2 changed files with 2 additions and 1 deletions

View File

@@ -86,7 +86,7 @@ def make_get_request():
@mock.patch('vcr.cassette.requests_match', return_value=True)
@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.stubs.VCRHTTPResponse')
def test_function_decorated_with_use_cassette_can_be_invoked_multiple_times(*args):

View File

@@ -3,6 +3,7 @@ from ..serialize import serialize, deserialize
class FilesystemPersister(object):
@classmethod
def load_cassette(cls, cassette_path, serializer):
with open(cassette_path) as f: