From c3298c25a30a447830a4b7c717fb7b243b7854d7 Mon Sep 17 00:00:00 2001 From: Nick DiRienzo Date: Mon, 20 Jun 2016 23:43:47 -0700 Subject: [PATCH] Updated comments --- tests/integration/test_stubs.py | 4 ++-- vcr/filters.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_stubs.py b/tests/integration/test_stubs.py index 79c6c35..92ce0f2 100644 --- a/tests/integration/test_stubs.py +++ b/tests/integration/test_stubs.py @@ -66,8 +66,8 @@ def test_original_decoded_response_is_not_modified(tmpdir, httpbin): assert inside.headers.items() == outside.headers.items() assert inside.read() == outside.read() - # Even though the above are raw bytes, the JSON data should have be decoded - # and saved to the cassette. + # Even though the above are raw bytes, the JSON data should have been + # decoded and saved to the cassette. with vcr.use_cassette(testfile) as cass: inside2 = urlopen(request) assert 'content-encoding' not in inside2.headers diff --git a/vcr/filters.py b/vcr/filters.py index d1a3037..bd7e6c6 100644 --- a/vcr/filters.py +++ b/vcr/filters.py @@ -146,8 +146,8 @@ def decode_response(response): else: # encoding == 'deflate' return zlib.decompress(body) - # Deepcopy here in case headers contain lists and other objects that could - # be mutated by a shallow copy. + # Deepcopy here in case `headers` contain objects that could + # be mutated by a shallow copy and corrupt the real response. response = copy.deepcopy(response) headers = CaseInsensitiveDict(response['headers']) if is_compressed(headers):