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
8947f0fc5c
Add failing test for session still being attached to cassette after context is gone.
2014-09-18 17:03:13 -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
58fcb2b453
Add test that fails because of the fact that a new class is used for each cassette context instead of replacing the cassette on the existing mock connection.
2014-09-18 16:17: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
9a564586a4
Failing tests for nested context decoration.
2014-09-18 03:46:39 -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
0cfe63ef6e
Bump version number for new use_cassette_decorator.
2014-09-16 23:53:50 -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
Kevin McCarthy
20057a6815
Merge pull request #101 from IvanMalison/minor_cleanup
...
Clean up __init__.py .
2014-09-15 19:10:40 -10:00
Ivan Malison
0d313502b8
Clean up __init__.py .
2014-09-15 21:10:24 -07:00
Kevin McCarthy
d9c2b4b25d
Merge pull request #100 from IvanMalison/immutable_keyword_defaults
...
Make defaults of Cassette constructor immutable. Clean up whitespace. Re...
2014-09-12 14:01:55 -10:00
Ivan Malison
640681138a
Make defaults of Cassette constructor immutable. Clean up whitespace. Remove unused import.
2014-09-12 02:16:32 -07:00
Kevin McCarthy
a02bbbab2b
Merge pull request #97 from matt-thomson/multiple-headers
...
Fix serialization/deserialization of multiple headers with the same value
2014-09-07 10:06:26 -10: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
Matt Thomson
7a5795a547
Add test to demonstrate Python 3 multiple headers bug.
2014-09-06 16:32:29 +01:00
Kevin McCarthy
1bd3fbd2c6
bump version
v1.0.3
2014-09-01 15:50:25 -10: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
Kevin McCarthy
a23c5d8508
Merge pull request #87 from hartsock/master
...
Python 3: print_function
2014-07-24 18:10:24 -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
c56de472cd
Remove extra colon in README
...
Closes #82
2014-07-07 16:02:29 -10:00
Kevin McCarthy
c6590f2caf
bump version
v1.0.2
2014-05-17 13:09:10 -10:00
Kevin McCarthy
70abc5058c
requests 2.3 compat
2014-05-17 12:58:31 -10:00
Kevin McCarthy
0c1f1e2479
Version bump to 1.0.1
v1.0.1
2014-05-17 09:44:02 -10:00
Kevin McCarthy
8d90dba16c
Ignore requests before trying to play them
...
Closes #79
2014-05-17 09:34:50 -10:00
Kevin McCarthy
3072c56ed2
Update README.md
2014-05-12 09:22:09 -10:00
Kevin McCarthy
c84fb1886b
bump version
v1.0.0
2014-05-10 12:01:19 -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
83ff73792e
forgot to check in tests
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