Parker Hancock
f5fc7aac22
fix tests
2023-12-08 16:38:33 -03:00
Parker Hancock
7bf8f65815
fixes for httpx
2023-12-08 16:38:33 -03:00
Jair Henrique
6446d00e27
Drop boto 2 support
2023-07-31 08:49:23 -03:00
Sebastian Pipping
e7c00a4bf9
Merge pull request #739 from kevin1024/issue-734-fix-body-matcher-for-chunked-requests
...
Fix body matcher for chunked requests (fixes #734 )
2023-07-23 23:22:34 +02:00
Sebastian Pipping
a045a46bb4
Merge pull request #740 from kevin1024/issue-512-fix-query-param-filter-for-aiohttp
...
Fix query param filter for aiohttp (fixes #517 )
2023-07-19 15:37:54 +02:00
Sebastian Pipping
8ab8e63e04
test_filter.py: Make test_filter_querystring meaner
2023-07-10 16:34:09 +02:00
Sebastian Pipping
d2c1da9ab7
test_aiohttp.py: Cover filter_query_parameters with aiohttp
2023-07-10 16:34:08 +02:00
Sebastian Pipping
e69b10c2e0
test_matchers.py: Briefly cover chunked transfer encoding
2023-07-08 02:25:51 +02:00
Sebastian Pipping
05f61ea56c
Make json.loads of Python >=3.6 decode bytes by itself
...
Quoting https://docs.python.org/3/library/json.html#json.loads :
> Changed in version 3.6: s can now be of type bytes or bytearray.
> The input encoding should be UTF-8, UTF-16 or UTF-32.
2023-07-07 20:00:57 +02:00
Jair Henrique
4f70152e7c
Enable rule B (flake8-bugbear) on ruff
2023-06-27 17:36:26 -03:00
Jair Henrique
016a394f2c
Enable E, W and F linters for ruff
2023-06-26 20:46:09 -03:00
Jair Henrique
6b2fc182c3
Improve string format
2023-06-26 20:46:09 -03:00
Jair Henrique
a77173c002
Use ruff as linter
2023-06-26 20:46:09 -03:00
Sebastian Pipping
ad1010d0f8
Merge pull request #695 from kevin1024/drop37
...
Drop support for Python 3.7 (after 2023-06-27)
2023-06-26 18:32:42 +02:00
Amos Ng
d99593bcd3
Split persister errors into CassetteNotFoundError and CassetteDecodeError ( #681 )
2023-06-26 18:27:35 +02:00
Jair Henrique
b827cbe2da
Drop support to python 3.7
2023-06-26 11:46:20 -03:00
Sebastian Pipping
f21c8f0224
assertions.py: Fix mis-leading assert_is_json
...
Parameter name "a_string" was mistaken and function
name "assert_is_json" was less clear than ideal,
given that it explicitly needs bytes unlike json.loads .
2023-06-24 15:59:23 +02:00
Sebastian Pipping
6e511b67fd
Merge pull request #723 from kevin1024/issue-719-compression-urllib3-v2
...
Make decompression robust towards already decompressed input (arguably fixes #719 )
2023-06-22 15:45:10 +02:00
Sebastian Pipping
6a12bd1511
test_requests.py: Cover response.raw.stream()
2023-06-21 14:52:13 +02:00
Sebastian Pipping
438a65426b
filters.py: Make decompression robust towards decompressed input
2023-06-21 02:28:36 +02:00
Sebastian Pipping
8c6b1fdf38
test_requests.py: Extend coverage of gzip response
...
.. with regard to:
- not crashing with decode_compressed_response==True
- expected cassette content for body string
- expected response content, i.e. proper decompression
2023-06-21 02:28:36 +02:00
Jochen Sprickerhof
7007e944ae
pytest.mark.online tests that need internet
2023-06-18 16:52:51 +02:00
Sebastian Pipping
e3aae34ef7
Merge pull request #713 from mghantous/mg/read1
...
VCRHTTPResponse Not Working with Biopython 1.81
2023-06-12 13:08:00 +02:00
Sebastian Pipping
d613a814d3
vcr/unittest: Simplify file layout
...
.. and make "from vcr.unittest import VCRTestCase" work again.
2023-06-08 16:28:34 +02:00
Sebastian Pipping
dedb7ec403
Resolve needless inheritence from object (Python 3)
2023-06-08 16:28:34 +02:00
Matt Ghantous
5476dd010c
Casting to BufferedReader no longer needed in test
2023-06-05 23:47:47 -04:00
Abram Clark
3b41f0ede3
Fix for #174 to prevent filters from corrupting request
2023-05-27 09:40:53 -03:00
Sebastian Pipping
7c402ae4b0
test_vcr.py: Clarify that test_vcr_before_record_request_params is an offline test
2023-05-26 10:55:44 -05:00
Sebastian Pipping
88c0039089
Make test "test_cookies" more mean and helpful
2023-05-26 10:55:44 -05:00
Sebastian Pipping
00da5ac5af
Make test_headers robust with regard to order of headers
2023-05-26 10:55:44 -05:00
Sonny V
51c99bb9df
fix: use urllib3.connection where needed.
...
Since urllib3 v2 the re-export of connection.HTTPConnection in
urllib3.connectionpool was removed.
In this commit we use urllib3.connection where needed. Some references
to connectionpool.HTTPConnection are still there for backward
compatibility.
Closes #688
2023-05-26 10:55:44 -05:00
Sebastian Pipping
43484e7cff
test_aiohttp.py: Make cookie tests use pytest-httpbin ( #706 )
...
.. to make them faster and more robust.
2023-05-26 01:16:20 +02:00
Sebastian Pipping
24af48d468
Drop support for botocore <1.11.0
2023-05-15 14:06:26 +02:00
Jair Henrique
14cef83c15
Move some tests to use mockbin instead httpbin
2023-05-11 17:03:54 -03:00
Jair Henrique
77da67ef0a
Remove duplicated fixture
2023-05-11 10:05:50 -03:00
Sebastian Pipping
4994c53590
Fix formatting with regard to black 23.3.0
2023-05-05 10:14:46 -03:00
Daniel Silva
010fa268d1
test: add tests to drop_unused_requests option
2023-01-04 20:09:31 +00:00
Jair Henrique
cef85a4986
remove pytest deprecation warning for yield_fixture
2022-10-31 22:44:26 -03:00
Terseus
2980bfccde
Fix lint errors
2022-10-31 22:43:03 -03:00
Dan Passaro
7599f4d50a
Fix Py3 tests using b'' literal
2022-10-31 22:43:03 -03:00
Dan Passaro
995020bf06
Add record_on_exception flag.
...
Defaults to True, which maintains historical behavior.
Fixes #205 .
2022-10-31 22:43:03 -03:00
Jair Henrique
423ccaa40b
Set fail-fast to false on CI
2022-10-31 22:18:30 -03:00
Josef
526fdbb194
Add Path handling to use_cassette and to filesystem.py persister
...
* now it is possible to use path from pathlib
2022-10-31 22:15:14 -03:00
Jair Henrique
0eece7f96e
Add isort to code lint
2022-10-09 11:35:37 -03:00
Chris Wesseling
eb59d871b4
Handles empty responses with gzip/deflate encoding.
...
Closes #661
2022-10-09 11:04:44 -03:00
Tim Gates
35378d046f
docs: Fix a few typos
...
There are small typos in:
- tests/integration/test_record_mode.py
- tests/integration/test_stubs.py
- vcr/stubs/__init__.py
Fixes:
- Should read `repercussions` rather than `repurcussions`.
- Should read `superclass` rather than `superclas`.
- Should read `cassette` rather than `casssette`.
Signed-off-by: Tim Gates <tim.gates@iress.com >
2022-08-04 08:42:13 -03:00
Andre Ambrosio Boechat
be1035fd5d
Check if query params in the string URL are also included in the final params
2022-06-13 09:54:20 -03:00
Andre Ambrosio Boechat
7add8c0bab
Don't assume params to be a dictionary
...
aiohttp also fails with pass parameter values with types other than
string, integer or float.
2022-06-13 09:54:20 -03:00
Paulo Romeira
7e73085331
aiohttp: Add tests to aiohttp allow_redirects option
2022-04-19 11:10:41 -03:00
immerrr
25f715bc42
Fix httpx support (select between allow_redirects/follow_redirects)
2022-04-19 09:32:25 -03:00