1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 01:03:24 +00:00

Merge pull request #1 from IvanMalison/persistence_methods

Fix patch of FliesystemPersister.load_cassette
This commit is contained in:
Julien Funk
2017-01-14 15:59:13 -05:00
committed by GitHub
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: