Ivan Malison
0dd7b05990
Get rid of all the constructor parameters that were removed in 0871c3b87c
2015-03-31 13:03:11 -07:00
Ivan Malison
c0a22df7ed
Add ability to add custom patches to vcr and cassettes.
2015-01-08 10:54:27 -08: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
a9a68ba44b
Random tweaks.
2014-10-05 18:37:01 -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
b1cdd50e9b
Fix some of the issues from #109
2014-09-19 17:06:53 -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
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
640681138a
Make defaults of Cassette constructor immutable. Clean up whitespace. Remove unused import.
2014-09-12 02:16:32 -07:00
Kevin McCarthy
8d90dba16c
Ignore requests before trying to play them
...
Closes #79
2014-05-17 09:34:50 -10:00
Max Shytikov
52c9bf04fe
Added implementation for Cassette#all_payed
2014-05-06 00:46:43 +02:00
Kevin McCarthy
3990b32892
New Feature: Ignore Some Requests
...
Add 2 new options, ignore_localhost and ignore_hosts, which can ignore
requests so they aren't recorded in a cassette.
Closes #74
2014-05-03 15:25:31 -10:00
Max Shytikov
7b253ebc6f
pep8
2014-05-02 07:32:17 +02:00
Max Shytikov
2fa1aaa1f7
Replaced 'url' mather with 'uri'.
2014-04-30 02:31:11 +02:00
Kevin McCarthy
e6fdc735e4
Filter Sensitive Data From Requests
...
Add the ability to filter out sensitive data, using one of three
methods: from headers, from a query string, and by using a custom
callback to modify the request.
Closes #67
2014-04-27 11:38:28 -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
Kevin McCarthy
2cf779d776
PEP8 Fixes
2013-12-19 19:43:32 -10:00
Kevin McCarthy
d4494bae50
Let's have the new exceptions subclass basic exception types
2013-12-19 19:43:32 -10:00
Marc Abramowitz
a6806f2f99
Nicer error when cassette doesn't contain request
...
Raise UnhandledHTTPRequestError.
Show name of cassette and request.
2013-12-19 15:41:04 -08:00
Kevin McCarthy
144d25bc66
Add Decorator Support
2013-12-15 16:56:25 -10:00
Kevin McCarthy
49929e3064
formatting fixes
2013-12-01 14:38:46 -10:00
Kevin McCarthy
188b57a2fa
Fix API by adding 'responses_of' method
...
`responses_of` replaces `response_of`, since each request can have
several matching responses now.
This breaks backwards compatibility if you are using the
response_of method, so a version bump will be required.
2013-12-01 14:26:35 -10:00
Kevin McCarthy
89403c255c
Record Multiple Matching Requests
...
This change allows us to record multiple matching requests to
the same URL, and then play them back sequentially.
Closes #40 , #41
2013-11-10 12:17:39 -10:00
Kevin McCarthy
a66f462dcd
Add support for custom request matchers
...
This commit not only changes the default method of matching requests
(just match on method and URI instead of the entire request + headers)
but also allows the user to add custom matchers.
2013-09-16 20:46:00 -10:00
Kevin McCarthy
03c22d79dd
Add support for configurable record modes
...
This support will let you select one of four different behaviors
for VCR's cassettes. Closes #23
2013-09-15 18:43:02 -10:00
Kevin McCarthy
c8299103fb
pep8 fixes
2013-08-23 20:35:43 -10:00
shu zOMG chen
b55834e929
Don't save cassette when it hasn't been modified
2013-08-23 20:35:42 -10:00
Kevin McCarthy
65254b4969
change serializer API so it doesn't have to do file stuff
2013-08-22 19:18:58 -10:00
Kevin McCarthy
6005420409
Let's do an instance/module-based API for serializers
2013-08-22 17:39:52 -10:00
Kevin McCarthy
b7af8bae71
keep yaml as default cassette serializer to fix unit tests
2013-08-19 19:49:06 -10:00
Kevin McCarthy
1478ce82fd
make config options actually do stuff
2013-08-19 19:49:06 -10:00
shu zOMG chen
51f0f1bacd
Adding json serializer
2013-08-19 19:49:05 -10:00
Kevin McCarthy
e61c503d96
Use ordereddict so responses actually stay in order
2013-08-11 17:54:22 -10:00
Kevin McCarthy
59567a26cc
lets make url the actual url instead of just the path
2013-08-11 15:05:41 -10:00
Kevin McCarthy
a50cebaf21
change response to response_of
2013-08-11 15:05:41 -10:00
Kevin McCarthy
4f0668471e
Refactor again to try to give Cassette a cleaner interface
2013-08-11 15:05:41 -10:00
Kevin McCarthy
5d1c1ecc92
add str to cassette object
2013-08-11 15:05:41 -10:00
Kevin McCarthy
e39b48e73b
add a couple more tests, change played api to require request being played
2013-08-11 15:05:41 -10:00
Kevin McCarthy
4cdf5f7483
update cassette unit tests
2013-08-11 15:05:41 -10:00