Aliaksandr Buhayeu
9daf301deb
Fix for Serialization errors with JSON adapter
...
This patch aims to fix the issue#222,
where json data in request can not be serialized
because of TypeError in py3
2016-05-01 14:22:17 -10:00
Jayson Reis
632af2e41a
Fix/ignore some flake errors
2016-01-20 12:28:46 +01:00
Ivan Malison
43b3411e6c
Fix travis check for flakes
2016-01-11 17:00:02 -08:00
Ivan Malison
99d4150df8
allow filtering by response
2016-01-11 16:07:44 -08:00
Ivan 'Goat' Malison
3459d95d4f
Merge pull request #234 from tobiowo/decode-compressed-response
...
Decode compressed response option
2015-12-31 10:18:34 -08:00
Olutobi Owoputi
5d866dd77c
support python 3.4
2015-12-02 14:43:06 -08:00
Olutobi Owoputi
2d08358b5c
tests / docs for decode_compressed_response
2015-12-02 12:26:23 -08:00
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
Aron Griffis
77de8dc47e
Update VCR params to use new filters.
2015-11-07 17:05:25 -05:00
Aron Griffis
cb40a45eba
Add replace_post_data_parameters()
2015-11-07 17:05:25 -05:00
Aron Griffis
678586904b
Add replace_query_parameters()
2015-11-07 17:05:25 -05:00
Aron Griffis
ddbf0464f4
Add replace_headers()
2015-11-07 17:05:25 -05:00
Bocai Cen
7990c549d1
fix decoration when in _handle_function does not return the wrapped function return value
2015-10-01 23:17:15 -04:00
Tye Wang
79ff59feae
Attributes set on VCRConnection now also get set on the real_connection
2015-09-03 14:35:28 -04:00
Ivan 'Goat' Malison
34252bc234
Merge pull request #192 from agriffis/insensitive-headers
...
Make request.headers always a CaseInsensitiveDict.
2015-08-28 14:47:45 -07:00
Aron Griffis
3f006cc261
Merge pull request #201 from agriffis/path-transformer-default
...
Default path_transformer=None. Fixes #199
2015-08-28 07:55:13 -04:00
Aron Griffis
0eda8ba482
Default path_transformer=None. Fixes #199
2015-08-28 07:25:03 -04:00
Ivan Malison
c8180326ad
Automatically decorate dynamically added methods with auto_decorate
2015-08-28 02:17:01 -07:00
Ivan Malison
6fd04f3675
Add test_case method to VCR
...
this method provides a class that can be inherited from to decorate all
test methods on the desired class with use_cassette using the relevant vcr
2015-08-28 01:44:39 -07:00
Aron Griffis
7312229aef
Add HeadersDict, and mark add_header deprecated.
...
HeadersDict is a subclass of CaseInsensitiveDict with two new features:
1. Preserve the case of the header key from the first time it was set.
This means that later munging won't modify the key case. (You can
force picking up the new case with `del` followed by setting.)
2. If the value is a list or tuple, unpack it and store the first
element. This is the same as how `Request.add_header()` used to work.
For backward compatibility this commit preserves `Request.add_header()` but
marks it deprecated.
2015-08-25 06:30:50 -04:00
Aron Griffis
3e5553c56a
Don't drop passed-in before_record_response
...
This is an actual bugfix. If before_record_response is passed into VCR as
an iterable then it won't be included in filter_functions. This commit
repairs the logic to separate the tests (just as it's already done for
before_record_request).
Also use .extend() rather than looping on .append()
2015-08-23 16:00:52 -04:00
Ivan Malison
ae5580c8f9
style changes in test_vcr.py
2015-08-22 18:59:59 -07:00
Ivan Malison
f342f92f03
additional_matchers test
2015-08-22 18:58:12 -07:00
Ivan Malison
89cdda86d1
fix generator test.
2015-07-30 14:22:16 -07:00
Ivan Malison
a234ad6b12
Fix all the tests in python 3
2015-07-30 03:39:04 -07:00
Ivan Malison
21c176ee1e
Make cassette active for duration of coroutine/generator
...
Closes #177 .
2015-07-30 01:47:29 -07:00
Greg Ward
fe7d193d1a
Add several more test cases for issue #163 .
2015-07-16 14:49:48 -04:00
Greg Ward
09b7ccf561
Ensure that request bodies are always bytes, not text ( fixes #163 ).
...
It shouldn't matter whether the request body comes from a file or a
string, or whether it is passed to the Request constructor or assigned
later. It should always be stored internally as bytes.
2015-07-16 14:36:26 -04:00
Ivan Malison
33a4fb98c6
Update unit tests for body matcher. Simplified logic.
2015-07-15 00:01:31 -07:00
Diaoul
c0286dfd97
Add body matcher unit tests
2015-07-11 23:22:42 +02:00
Thomas Grainger
41949f7dc6
use conditional requirements for backport libraries Fixes #147
2015-07-02 09:34:27 +01:00
Chase Sterling
5fc33c7e70
Add tests for explicitly specifying a path when library dir is defined
2015-05-15 19:06:05 -04:00
marco.santamaria
59aa351ca8
Added support for json post data in filter_post_data_parameters.
2015-05-14 14:13:14 +02:00
Ivan Malison
2323b9da5f
Automatically generate cassette names from function names. Add
...
`path_transformer` and `func_path_generator`. Closes #151 .
2015-05-10 03:22:43 -07:00
Ivan Malison
0bbbc694b0
Make CassetteContextDecorator decorator produce reentrant functions.
...
Closes #150 .
2015-05-09 23:14:00 -07:00
Ivan Malison
881138cb8d
inject_cassette fallout.
2015-04-01 17:46:35 -07:00
Ivan Malison
639dba6f7a
Write test for #145 that checks behavior of with_current_defaults.
2015-04-01 17:30:05 -07:00
Ivan Malison
b9bdc6401d
inject_cassette kwarg.
2015-04-01 17:30:05 -07:00
Edward Stone
0def349420
Add ability to filter post data parameters
2015-03-31 13:12:13 -07:00
Abhinav Gupta
2473bdb77a
Fix default port for HTTPS.
2015-02-23 23:37:04 -08:00
Ivan Malison
c0a22df7ed
Add ability to add custom patches to vcr and cassettes.
2015-01-08 10:54:27 -08:00
Rodrigo Taboada
c955a5ea88
String in request body should be bytes.
2014-10-24 18:30:32 -02:00
Rodrigo Taboada
5423d99f5a
Tests for VCRHTTPResponse headers field.
2014-10-24 17:40:51 -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
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
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