From e3f2bc8369418ccb03ae21aea3576486f586ef93 Mon Sep 17 00:00:00 2001 From: Sam Stavinoha Date: Tue, 31 Mar 2015 21:05:12 -0500 Subject: [PATCH] fix with_current_defaults causing TypeError The from_args() method in cassette.py was throwing a TypeError when calling use_cassette(..., with_current_defaults=True) ... TypeError: from_args() takes exactly 3 arguments (4 given) The path was then being passed to use() twice. --- vcr/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcr/config.py b/vcr/config.py index 47f7540..5cf82b9 100644 --- a/vcr/config.py +++ b/vcr/config.py @@ -69,7 +69,8 @@ class VCR(object): def use_cassette(self, path, with_current_defaults=False, **kwargs): if with_current_defaults: - return Cassette.use(path, self.get_path_and_merged_config(path, **kwargs)) + path, config = self.get_path_and_merged_config(path, **kwargs) + return Cassette.use(path, **config) # This is made a function that evaluates every time a cassette is made so that # changes that are made to this VCR instance that occur AFTER the use_cassette # decorator is applied still affect subsequent calls to the decorated function.