1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00
This commit is contained in:
Ivan Malison
2015-08-18 16:26:51 -07:00
parent bd7c6ed03f
commit 8b7e6c0ab8
3 changed files with 9 additions and 5 deletions

View File

@@ -608,6 +608,8 @@ new API in version 1.0.x
Changelog Changelog
--------- ---------
- 1.7.2 [#186] Get effective_url in tornado (thanks @mvschaik), [#187]
Set request_time on Response object in tornado (thanks @abhinav).
- 1.7.1 [#183] Patch ``fetch_impl`` instead of the entire HTTPClient - 1.7.1 [#183] Patch ``fetch_impl`` instead of the entire HTTPClient
class for Tornado (thanks @abhinav). class for Tornado (thanks @abhinav).
- 1.7.0 [#177] Properly support coroutine/generator decoration. [#178] - 1.7.0 [#177] Properly support coroutine/generator decoration. [#178]

View File

@@ -51,7 +51,7 @@ except Exception:
setup( setup(
name='vcrpy', name='vcrpy',
version='1.7.1', version='1.7.2',
description=( description=(
"Automatically mock your HTTP interactions to simplify and " "Automatically mock your HTTP interactions to simplify and "
"speed up testing" "speed up testing"

View File

@@ -47,14 +47,16 @@ class CassetteContextDecorator(object):
def _patch_generator(self, cassette): def _patch_generator(self, cassette):
with contextlib.ExitStack() as exit_stack: with contextlib.ExitStack() as exit_stack:
for patcher in CassettePatcherBuilder(cassette).build: for patcher in CassettePatcherBuilder(cassette).build():
exit_stack.enter_contextpatcher exit_stack.enter_context(patcher)
log_format = '{action} context for cassette at {path}.' log_format = '{action} context for cassette at {path}.'
log.debug(log_format.format( log.debug(log_format.format(
cassette._path action="Entering", path=cassette._path
)) ))
yield cassette yield cassette
log.debug('Exiting context for cassette at {0}.'.format(cassette._path)) log.debug(log_format.format(
action="Exiting", path=cassette._path
))
# TODO(@IvanMalison): Hmmm. it kind of feels like this should be # TODO(@IvanMalison): Hmmm. it kind of feels like this should be
# somewhere else. # somewhere else.
cassette._save() cassette._save()