Chase Sterling
f6aa6eac84
Play back requests requests on windows. fix #116
2014-12-08 14:28:48 -05:00
Nithin Reddy
5162d183e5
Fixes #123 . When attempting to replay the same request twice using record_mode="new_episodes", vcr.py raises UnhandledHTTPRequestError.
2014-11-20 19:07:21 -08:00
Ivan Malison
9d52c3ed42
Remove warning message caused by lack of is_verified property on HTTPSConnection stub.
2014-11-13 16:32:38 -08:00
Rodrigo Taboada
a71c15f398
Create headers field in VCRHTTPResponse. Fixes #117 .
2014-10-24 16:37:12 -02:00
Ivan Malison
916e7839e5
Actually use pytest.raises in test.
2014-10-07 13:45:09 -07:00
Ivan Malison
99692a92d2
Handle unicode error in json serialize properly.
2014-10-07 13:21:47 -07: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
2c6f072d11
better logging when matches aren't working.
2014-09-25 04:49:00 -07:00
Ivan Malison
0871c3b87c
Remove instance variables for filter_headers, filter_query_params, ignore_localhost and ignore_hosts. These still exist on the VCR object, but they are automatically translated into a filter function when passed to the cassette.
2014-09-22 17:57:22 -07:00
Ivan Malison
b046ee4bb1
Fix use_cassette decorator in python 2 by using wrapt.decorator. Add wrapt as dependency.
2014-09-22 16:40:09 -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
b6e96020c1
Use {[testenv]deps}, instead of repeating testing requirements. Write another failing test for #109
2014-09-19 14:31:49 -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
2193008150
Python version agnostic way of getting the next item in the generator.
2014-09-18 05:59:03 -07:00
Ivan Malison
958aac3af3
Use mock for patching http connection objects.
2014-09-18 05:32:55 -07:00
Ivan Malison
643a4c91ee
Change use_cassette to pass a function to CassetteContextDecorator so that changes to the default settings on the vcr properly propogate.
2014-09-18 02:52:44 -07:00
Ivan Malison
472cc3bffe
use_cassette -> CassetteContextDecorator
2014-09-17 23:22:43 -07:00
Ivan Malison
8db46002a3
Fix failure in test_local_host resulting from attempting to add tuple to list.
2014-09-17 21:48:28 -07:00
Ivan Malison
a08c90c5d6
Revert "Add global toggle to use_cassette."
...
This reverts commit 366e2b75bb .
Conflicts:
tests/unit/test_cassettes.py
2014-09-17 21:42:25 -07:00
Ivan Malison
8e01426056
Change default paramters to VCR from lists to tuples.
2014-09-17 19:29:02 -07:00
Ivan Malison
9a4f5f23a4
Add before_record_response to Cassette and VCR.
2014-09-17 04:10:05 -07:00
Ivan Malison
366e2b75bb
Add global toggle to use_cassette.
2014-09-17 01:28:54 -07:00
Ivan Malison
cb05f4163c
Add use_cassette class so functinos that are decorated with use_cassette can be called multiple times.
2014-09-16 23:45:05 -07:00
Ivan Malison
0d313502b8
Clean up __init__.py .
2014-09-15 21:10:24 -07:00
Ivan Malison
640681138a
Make defaults of Cassette constructor immutable. Clean up whitespace. Remove unused import.
2014-09-12 02:16:32 -07:00
Matt Thomson
f719f90e63
Fix multiple header behaviour.
...
Join multiple header values together, rather than losing duplicates with a
dict.
2014-09-06 17:15:15 +01:00
Matt Thomson
3c410b5f9d
Don't write header values multiple times.
...
On Python 3, response.msg.keys() contains the same value multiple times if
there are multiple headers with the same value. Work around this by
converting to a set before iterating over it.
2014-09-06 16:57:12 +01:00
Kevin McCarthy
cd715f37c6
Fix requests stub. Closes #94
2014-09-01 15:48:57 -10:00
Kevin McCarthy
9a1147196a
getheader() in stubs should be case-insensitive
2014-08-01 16:28:21 -10:00
Shawn Hartsock
868a974900
Python 3: print_function
...
Use print function if you must print, this lets us use the
library in python 3 environments.
partial: https://github.com/kevin1024/vcrpy/issues/86
2014-07-24 16:33:47 -04:00
Kevin McCarthy
70abc5058c
requests 2.3 compat
2014-05-17 12:58:31 -10:00
Kevin McCarthy
8d90dba16c
Ignore requests before trying to play them
...
Closes #79
2014-05-17 09:34:50 -10:00
Kevin McCarthy
3b05d499c3
Merge pull request #78 from mshytikov/feature/cassette-all-played
...
Feature/Cassette#all_played
2014-05-10 11:58:28 -10:00
Kevin McCarthy
8eb54c012f
pep8
2014-05-10 11:52:36 -10:00
Kevin McCarthy
6d656717a1
gotta think of the future
2014-05-10 11:52:36 -10:00
Kevin McCarthy
d7f7152dbf
add note about hack
2014-05-10 11:52:36 -10:00
Kevin McCarthy
483554ed2e
more migration replacement strings
2014-05-10 11:52:36 -10:00
Kevin McCarthy
fd30689c12
check for old cassette version
2014-05-10 11:52:36 -10:00
Kevin McCarthy
62f9c528b5
string replace frozenset
2014-05-10 11:52:36 -10:00