]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
Fix before_record_reponse doc
authorThomas Grainger <tagrain@gmail.com>
Thu, 16 Jul 2015 14:13:19 +0000 (15:13 +0100)
committerThomas Grainger <tagrain@gmail.com>
Thu, 16 Jul 2015 14:13:19 +0000 (15:13 +0100)
README.rst

index 53d9e4bc0ea2799bd642e7e635b4fa0b9b03f8ed..fc64d4ad6915b76395b6ac3d780edd51e2b65d0d 100644 (file)
@@ -419,10 +419,10 @@ that of ``before_record``:
     def scrub_string(string, replacement=''):
         def before_record_reponse(response):
             return response['body']['string'] = response['body']['string'].replace(string, replacement)
-        return scrub_string
+        return before_record_reponse
 
     my_vcr = vcr.VCR(
-        before_record=scrub_string(settings.USERNAME, 'username'),
+        before_record_reponse=scrub_string(settings.USERNAME, 'username'),
     )
     with my_vcr.use_cassette('test.yml'):
          # your http code here