Skip to content

Commit efe6744

Browse files
committed
v1.7.3
1 parent 58f4b98 commit efe6744

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

README.rst

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ library <https://github.com/vcr/vcr>`__.
1414
What it does
1515
------------
1616

17-
VCR.py simplifies and speeds up tests that make HTTP requests. The first
18-
time you run code that is inside a VCR.py context manager or decorated
19-
function, VCR.py records all HTTP interactions that take place through
20-
the libraries it supports and serializes and writes them to a flat file
21-
(in yaml format by default). This flat file is called a cassette. When
22-
the relevant peice of code is executed again, VCR.py will read the
23-
serialized requests and responses from the aforementioned cassette file,
24-
and intercept any HTTP requests that it recognizes from the original
25-
test run and return responses that corresponded to those requests. This
26-
means that the requests will not actually result in HTTP traffic, which
27-
confers several benefits including:
17+
VCR.py simplifies and speeds up tests that make HTTP requests. The
18+
first time you run code that is inside a VCR.py context manager or
19+
decorated function, VCR.py records all HTTP interactions that take
20+
place through the libraries it supports and serializes and writes them
21+
to a flat file (in yaml format by default). This flat file is called a
22+
cassette. When the relevant peice of code is executed again, VCR.py
23+
will read the serialized requests and responses from the
24+
aforementioned cassette file, and intercept any HTTP requests that it
25+
recognizes from the original test run and return the responses that
26+
corresponded to those requests. This means that the requests will not
27+
actually result in HTTP traffic, which confers several benefits
28+
including:
2829

2930
- The ability to work offline
3031
- Completely deterministic tests
@@ -608,6 +609,9 @@ new API in version 1.0.x
608609

609610
Changelog
610611
---------
612+
- 1.7.3 [#188] ``additional_matchers`` kwarg on ``use_casstte``.
613+
[#191] Actually support passing multiple before_record_request
614+
functions (thanks @agriffis).
611615
- 1.7.2 [#186] Get effective_url in tornado (thanks @mvschaik), [#187]
612616
Set request_time on Response object in tornado (thanks @abhinav).
613617
- 1.7.1 [#183] Patch ``fetch_impl`` instead of the entire HTTPClient

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def run_tests(self):
5151

5252
setup(
5353
name='vcrpy',
54-
version='1.7.2',
54+
version='1.7.3',
5555
description=(
5656
"Automatically mock your HTTP interactions to simplify and "
5757
"speed up testing"

vcr/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ def _build_before_record_response(self, options):
162162
if not isinstance(before_record_response, collections.Iterable):
163163
before_record_response = (before_record_response,)
164164
filter_functions.extend(before_record_response)
165+
165166
def before_record_response(response):
166167
for function in filter_functions:
167168
if response is None:
@@ -221,6 +222,7 @@ def _build_before_record_request(self, options):
221222
if not isinstance(before_record_request, collections.Iterable):
222223
before_record_request = (before_record_request,)
223224
filter_functions.extend(before_record_request)
225+
224226
def before_record_request(request):
225227
request = copy.copy(request)
226228
for function in filter_functions:

vcr/matchers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from six.moves import urllib, xmlrpc_client
33
from .util import CaseInsensitiveDict, read_body
44
import logging
5+
6+
57
log = logging.getLogger(__name__)
68

79

0 commit comments

Comments
 (0)