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

Fix all the failing tests

This commit is contained in:
Ivan Malison
2015-07-30 02:08:42 -07:00
parent 21c176ee1e
commit 1d000ac652
2 changed files with 3 additions and 3 deletions

View File

@@ -278,7 +278,7 @@ def test_cannot_overwrite_cassette_raise_error_disabled(get_client, tmpdir):
@pytest.mark.gen_test
@vcr.use_cassette
@vcr.use_cassette(path_transformer=vcr.default_vcr.ensure_suffix('.yaml'))
def test_tornado_with_decorator_use_cassette(get_client):
response = yield get_client().fetch(
http.HTTPRequest('http://www.google.com/', method='GET')

View File

@@ -23,7 +23,7 @@ class VCR(object):
return path
return ensure
def __init__(self, path_transformer=None, before_record_request=None,
def __init__(self, path_transformer=lambda x: x, before_record_request=None,
custom_patches=(), filter_query_parameters=(), ignore_hosts=(),
record_mode="once", ignore_localhost=False, filter_headers=(),
before_record_response=None, filter_post_data_parameters=(),
@@ -59,7 +59,7 @@ class VCR(object):
self.ignore_hosts = ignore_hosts
self.ignore_localhost = ignore_localhost
self.inject_cassette = inject_cassette
self.path_transformer = path_transformer or self.ensure_suffix('.yaml')
self.path_transformer = path_transformer
self.func_path_generator = func_path_generator
self._custom_patches = tuple(custom_patches)