John Vandenberg
dc9cd4229b
Fix pyflakes and pep8 errors
...
Use extra asserts to use previously unused variables in tests,
such as `cass` and `response`.
Fix only pyflakes errors in docs/conf.py
2015-11-26 08:25:06 +11:00
Abhinav Gupta
c4a33d1cff
For Tornado AsyncHTTPClient, replace the methods instead of the class.
...
This makes it so patching works even if the user has a reference to, or an
instance of the original unpatched AsyncHTTPClient class.
Fixes #183 .
2015-08-12 10:51:08 -07:00
Abhinav Gupta
7922fec9fe
Tornado support
2015-07-02 14:33:34 -07:00
Thomas Grainger
41949f7dc6
use conditional requirements for backport libraries Fixes #147
2015-07-02 09:34:27 +01:00
Ivan Malison
789f118c98
whitespace change.
2015-06-09 00:54:54 -07:00
Ivan Malison
bba5df2fbb
clarifying comment in patch.py.
2015-03-23 18:00:23 -07:00
Ivan Malison
c87e6d6f6a
Clarifying comments in patch.py.
2015-03-23 17:55:49 -07:00
aisch
e6b43a0374
rename urllib3 patch method and rm unused imports from tests
2015-03-23 13:43:30 -07:00
aisch
63ec95be06
update urllib3 patch/stub to be same as used for requests and add tests
2015-03-23 12:12:49 -07:00
Ivan Malison
c0a22df7ed
Add ability to add custom patches to vcr and cassettes.
2015-01-08 10:54:27 -08:00
Ivan 'Goat' Malison
da45f46b2d
Merge pull request #125 from gazpachoking/pool_is_none
...
Fix crash with requests 2.5 where connectionpool was None
2014-12-08 13:20:36 -08:00
Chase Sterling
f6aa6eac84
Play back requests requests on windows. fix #116
2014-12-08 14:28:48 -05:00
Chase Sterling
821e148752
Fix crash with requests 2.5 where connectionpool was None
2014-12-07 13:49:23 -05:00
Ivan Malison
a9a68ba44b
Random tweaks.
2014-10-05 18:37:01 -07:00
Ivan Malison
163181844b
Refactor tox.ini using new 1.8 features.
2014-10-02 14:57:53 -07:00
Ivan Malison
a2c947dc48
Fix last bit of of #109 .
2014-09-21 05:06:28 -07:00
Ivan Malison
757ad9c836
Revert "Remove ConnectionRemover class that tried to get rid of vcr connections in ConnectionPools."
...
This reverts commit dc249b0965 .
Conflicts:
vcr/patch.py
2014-09-20 11:59:25 -07:00
Ivan Malison
18e5898ec4
Return a tuple from the _request function on CassettePatcherBuilder even if import fails. Make _recursively_apply_get_cassette_subclass actually work with dictionaries.
2014-09-20 11:28:59 -07:00
Ivan Malison
83211a1887
Make changes from b1cdd50e9b compatible with requests1.x; Update Readme.md with description of before_record_response
2014-09-20 11:05:25 -07:00
Ivan Malison
dc249b0965
Remove ConnectionRemover class that tried to get rid of vcr connections in ConnectionPools.
2014-09-19 19:02:59 -07:00
Ivan Malison
b1cdd50e9b
Fix some of the issues from #109
2014-09-19 17:06:53 -07:00
Ivan Malison
1018867838
Revert "Fixed issue in test_nested_context_managers_with_session_created_before_first_nesting. by using a single class and patching cassette on that class. Not a great solution :\"
...
This reverts commit 2bf23b2cdf .
2014-09-19 14:32:21 -07:00
Ivan Malison
2bf23b2cdf
Fixed issue in test_nested_context_managers_with_session_created_before_first_nesting. by using a single class and patching cassette on that class. Not a great solution :\
2014-09-18 17:01:48 -07:00
Ivan Malison
0c19acd74f
Use contextdecorator from contextlib2. add logging for entering context.
2014-09-18 15:25:42 -07:00
Ivan Malison
4868a63876
Refactor build_patchers into class. Fix issue with patching non existent attribute with hasattr.
2014-09-18 14:42:56 -07:00
Ivan Malison
e1e08c7a2c
hasattr check for requests 2.0 use cassette added type for httplib2 dictionary patch.
2014-09-18 08:02:50 -07:00
Ivan Malison
5edc58f10c
Check for old style class when building subclass.
2014-09-18 07:10:52 -07:00
Ivan Malison
958aac3af3
Use mock for patching http connection objects.
2014-09-18 05:32:55 -07:00
Kevin McCarthy
cd715f37c6
Fix requests stub. Closes #94
2014-09-01 15:48:57 -10:00
Kevin McCarthy
58ac00a7f6
pep8
2014-04-26 21:30:43 -10:00
Chris Marusich
955e532162
Add full support for Boto
...
Before this change, vcrpy would not work with modules of Boto (e.g., boto.iam)
that use Boto's CertValidatingHTTPSConnection to connect to AWS (unless you
went through the extra effort of disabling certificate validation during the
tests). This change adds support for those modules.
2014-04-03 13:52:30 -07:00
Kevin McCarthy
6d0a8d8ed9
use six.moves instead of _compat
2014-03-08 23:14:16 -10:00
Åsmund Grammeltvedt
a73da71159
Add Python 2.3 support
...
This commit also adds the 'six' dependency
2014-03-08 20:01:48 -10:00
Roberto Abdelkader Martínez Pérez
46a2c25f6a
httplib2 support
2014-03-08 19:35:30 -10:00
Kevin McCarthy
e84cd6f059
Major Refactor of Stubs
...
So the stubs were getting out of hand, and while trying to add support for the
putrequest and putheader methods, I had an idea for a cleaner way to handle
the stubs using the VCRHTTPConnection more as a proxy object. So
VCRHTTPConnection and VCRHTTPSConnection no longer inherit from HTTPConnection
and HTTPSConnection. This allowed me to get rid of quite a bit of
copy-and-pasted stdlib code.
2014-03-08 19:22:58 -10:00
Marc Abramowitz
559cd902e1
patch: Save requests...HTTPSConnection
...
so that we unpatch back to the correct class in reset().
Closes #59
2014-02-04 10:30:29 -08:00
Kevin McCarthy
d33b19b5bb
Fix Requests 2, Version Bump to 0.3.5
...
This fixes a compatiblity issue with the new version of requests.
Bumps the release version to 0.3.5, and closes #39 .
2013-10-24 21:57:18 -10:00
Kevin McCarthy
5ce67dc023
Add support for calling httplib.send().
...
This commit changes the whole core internal flow of requests.
Now, requests are actually physically made lazily when a response
is requested. This allows the entire request to be sent at once.
Otherwise, it would be impossible to compare whether requests have
already been recorded, since httplib.send() allows you to effectively
stream requests over HTTP.
2013-09-15 18:43:02 -10:00
Kevin McCarthy
c8299103fb
pep8 fixes
2013-08-23 20:35:43 -10:00
Kevin McCarthy
30350ac3d7
fix typo
2013-08-11 15:05:40 -10:00
Dan Lecocq
b488ca67fe
Substantial refactoring
...
This refactoring includes some PEP-8 compliance changes, as well as some more
complete testing to ensure that we're in fact serving everything out of
cassettes when we thing we are.
Incidentally, it also includes fixes for #3 and #4
2013-08-11 15:05:39 -10:00
Vitor M. A. da Cruz
8701e6025b
Removing patch for plain http using requests during reset
...
The patch was not removed, so subsequent connections were affected
2013-07-05 16:48:30 -03:00
Bryan Helmig
6208b0ce61
patch plain HTTP for requests
2013-04-28 12:12:22 -07:00
Kevin McCarthy
6af873eeb2
Add basic support for urllib3
2012-10-11 15:47:01 -10:00
Kevin McCarthy
41da9ddbab
Add Support for Requests Library
...
Added support and tests for the Requests library. At least basic
support seems to be working. The tests should run fine if you
don't have requests installed; it just won't verify the requests-
specific tests.
2012-09-16 12:29:45 -10:00
Kevin McCarthy
2576878f2e
Cassettes now store multiple requests
2012-06-30 15:10:20 -10:00
kevin1024
431e385ded
initial commit
2012-05-30 20:52:26 -10:00