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
Kevin McCarthy
007fa851ed
refactor migration script to reuse code
2014-05-10 11:52:36 -10:00
Kevin McCarthy
ffdba74299
remove pdb
2014-05-10 11:52:36 -10:00
Kevin McCarthy
2c895eb5e9
fix serialization problem
2014-05-10 11:52:36 -10:00
Kevin McCarthy
0c9761f7ff
encoooode
2014-05-10 11:52:35 -10:00
Kevin McCarthy
66c6909021
not really very happy about this
2014-05-10 11:52:35 -10:00
Kevin McCarthy
a302874c6d
update old cassette detection
2014-05-10 11:52:35 -10:00
Kevin McCarthy
b43c63f284
update serializers
2014-05-10 11:52:35 -10:00
Kevin McCarthy
2c33ae2664
fix a couple imports for py3
2014-05-10 11:52:35 -10:00
Kevin McCarthy
e50f917cf4
Make Serializers Dumber
...
Let's have the serializer just worry about serializing the dict
that we hand it, and move the unicode stuff up to a serialize module.
This should hopefully let us move toward using a version string in
cassettes.
2014-05-10 11:52:35 -10:00
Kevin McCarthy
4ab46f9643
fix python3 compat
2014-05-10 11:52:35 -10:00
Kevin McCarthy
23b5d49736
fix migration script
2014-05-10 11:52:35 -10:00