Nick DiRienzo
787c6bdb77
Fix flake8 issue
2016-06-21 06:54:05 -07:00
Nick DiRienzo
c3298c25a3
Updated comments
2016-06-20 23:43:47 -07:00
Nick DiRienzo
60145983bf
Added regression test
2016-06-20 23:23:31 -07:00
Kevin McCarthy
34d07406f9
missed a httpbin call
2016-05-01 17:16:05 -10:00
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
Kevin McCarthy
4e36997e1a
Use pytest-httpbin
...
This will help the test flakiness and speed up test runs.
2016-05-01 13:50:04 -10:00
Jayson Reis
632af2e41a
Fix/ignore some flake errors
2016-01-20 12:28:46 +01:00
Jayson Reis
7fdfce65ee
Add test to make sure we can post chunked binary data
2016-01-20 12:17:28 +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
Abhinav Gupta
d780bc04dd
Fix Tornado support behavior for Tornado 3.
...
Resolves #235 .
2015-12-19 18:18:20 -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
Ivan Malison
5f78657c52
test_boto cleanup
2015-08-28 13:03:09 -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
eda64bc3be
Make request.headers always a CaseInsensitiveDict.
...
Previously request.headers was a normal dict (albeit with the
request.add_header interface) which meant that some code paths would do
case-sensitive matching, for example remove_post_data_parameters which
tests for 'Content-Type'. This change allows all code paths to get the same
case-insensitive treatment.
Additionally request.headers becomes a property to enforce upgrading it to
a CaseInsensitiveDict even if assigned.
2015-08-24 16:19:34 -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
Abhinav Gupta
1e1c093b3c
Set request_time on Tornadoo HTTPResponses
2015-08-18 15:53:35 -07:00
Maarten van Schaik
ca3200d96e
Add test for urllib2
2015-08-14 12:42:17 +02:00
Maarten van Schaik
04b5978adc
Add effective url test for httplib2
2015-08-14 12:37:34 +02:00
Maarten van Schaik
01f1f9fdc1
Verify effective_url is ok
2015-08-14 12:29:50 +02:00
Maarten van Schaik
a82e8628c2
Requests actually stores redirected request
2015-08-14 12:28:41 +02:00
Maarten van Schaik
7d68f0577a
Capture effective URL in tornado
2015-08-14 12:08:57 +02:00
Abhinav Gupta
c4a33d1cff
For Tornado AsyncHTTPClient, replace the methods instead of the class.
...
This makes it so patching works even if the user has a reference to, or an
instance of the original unpatched AsyncHTTPClient class.
Fixes #183 .
2015-08-12 10:51:08 -07:00
Ivan Malison
89cdda86d1
fix generator test.
2015-07-30 14:22:16 -07:00
Abhinav Gupta
946ce17a97
Fix exception catching in coroutines.
2015-07-30 14:13:58 -07:00
Ivan Malison
4d438dac75
Fix tornado python3 tests.
2015-07-30 04:19:17 -07:00
Ivan Malison
a234ad6b12
Fix all the tests in python 3
2015-07-30 03:39:04 -07:00
Ivan Malison
1d000ac652
Fix all the failing tests
2015-07-30 02:08:42 -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
Abhinav Gupta
3846a4ccef
[Tornado] Fix unsupported features exception not being raised.
...
Add tests for that exception being raisd correctly and for
CannotOverwriteCassetteException.
2015-07-03 12:34:57 -07:00