Kevin McCarthy
5678b13b47
Fix ruff SIM117: use combined with statement
2025-12-08 09:19:48 -05:00
Kevin McCarthy
48f5f84f86
Fix ruff linting issues in aiohttp tests
2025-12-08 09:16:46 -05:00
Leonardo Rochael Almeida
31d8c3498b
aiohttp: Allow both data and json arguments ( #624 )
...
If at least one of them is `None`.
Previously, a `data=None` parameter would cause the `json` parameter to
be ignored, resulting in an empty request body payload on the cassette.
2025-12-08 09:13:51 -05:00
immerrr again
b28316ab10
Enable brotli decompression if it is available ( #620 )
...
* Enable brotli decompression if it is available
* Apply PR feedback
2025-12-05 16:50:36 -05:00
Mathieu Virbel
3f78330c1e
fix: usage of io-like interface with VCR.py ( #906 )
...
* fix: usage of io-like interface with VCR.py
* Update tests/integration/test_aiohttp.py
Co-authored-by: Jair Henrique <jair.henrique@gmail.com >
---------
Co-authored-by: Jair Henrique <jair.henrique@gmail.com >
2025-12-05 15:45:49 -05:00
Jair Henrique
e2f3240835
Fixes some tornado tests
2025-11-19 12:18:05 -03:00
Jair Henrique
bb690833bc
Enables SIM ruff lint
2025-11-19 12:18:05 -03:00
Jair Henrique
73eed94c47
Drops Python 3.9 support
2025-11-19 12:18:05 -03:00
Sebastian Pipping
5f1b20c4ca
Merge pull request #763 from danielnsilva/drop-unused-requests
...
Add an option to remove unused requests from cassette
2025-01-11 20:51:28 +01:00
Albertas Agejevas
3ddff27cda
Remove redundant assertions.
...
They are covered by the next line.
2025-01-07 21:48:24 +02:00
Albertas Agejevas
30b423e8c0
Use mode="none" in proxy tests as suggested by @hartwork.
2025-01-07 21:48:24 +02:00
Albertas Agejevas
c16e526d6a
Integration test for HTTPS proxy handling.
2025-01-07 21:48:24 +02:00
Daniel Silva
d64cdd337b
style: fix formatting issues to comply with pre-commit hooks
2025-01-04 23:45:43 +00:00
Jair Henrique
a6698ed060
Fix aiohttp tests
2024-12-28 13:42:54 -03:00
Thomas Grainger
f5597fa6c1
use pytest_httbin.certs.where() for cafile
2024-09-18 22:36:17 +01:00
Thomas Grainger
2b3247b3df
remove redundant load_cert_chain
2024-09-18 22:35:15 +01:00
Thomas Grainger
d123a5e8d0
replace fixture with constant
2024-09-18 22:34:48 +01:00
Thomas Grainger
e2815fbc88
move httbin_ssl_context fixture into the one place it's used
2024-09-18 22:31:36 +01:00
Mathieu Parent
241b0bbd91
Ensure body is consumed only once
...
Fixes : #846
Signed-off-by: Mathieu Parent <math.parent@gmail.com >
2024-07-21 22:53:45 +02:00
pre-commit
c88f2c0dab
pre-commit: Mass-apply ruff formatter
2024-03-06 14:35:01 +01:00
Michał Górny
e60dafb8dc
Improve test compatibility with legacy httpbin index
...
Make the tests slightly more flexible to match both the flasgger-based
and legacy httpbin index. This is needed for compatibility with
https://github.com/psf/httpbin/pull/44 when flasgger is not installed
(e.g. on architectures that are not supported by Rust).
2024-02-16 19:33:41 +01:00
Thomas Grainger
6252b92f50
add test for generator decorator return
2024-01-23 17:29:35 +00:00
Thomas Grainger
bf80673454
fix tornado related warnings
2024-01-23 13:02:29 +00:00
Thomas Grainger
784b2dcb29
tornado test_redirects is no longer an online test
2024-01-23 12:33:45 +00:00
Thomas Grainger
42b4a5d2fa
move off of mockbin on tornado tests also
2024-01-23 12:33:15 +00:00
Thomas Grainger
b7f6c2fce2
mark tornado tests as online
2024-01-23 12:24:48 +00:00
Thomas Grainger
db1f5b0dee
tornado 6 changes raise_error behaviour
2024-01-23 12:12:52 +00:00
Thomas Grainger
c6667ac56c
restore scheme fixture for tests
2024-01-23 12:12:05 +00:00
Thomas Grainger
5104b1f462
Merge branch 'master' of github.com:kevin1024/vcrpy into fix-resource-warning-2
2024-01-23 11:03:49 +00:00
Jair Henrique
53f686aa5b
Refactor test to not use tox.ini file
2024-01-22 23:17:25 -03:00
Allan Crooks
54bc6467eb
Run linters.
2024-01-22 23:13:10 -03:00
Allan Crooks
c5487384ee
Fix handling of encoded content in HTTPX stub.
...
Also copied over and adjusted some of the tests from
test_requests.py relating to gzipped handling to show
that the HTTPX stub is behaving in a consistent way to
how the requests stub is.
2024-01-22 23:13:10 -03:00
Allan Crooks
5cf23298ac
HTTPX stub now generates cassettes in the same format as other stubs.
...
As part of this, I've removed the tests which inspect the
data type of the response content in the cassette. That
behaviour should be controlled via the inbuilt serializers.
2024-01-22 23:13:10 -03:00
Allan Crooks
5fa7010712
Allow HTTPX stub to read cassettes generated by other stubs.
...
This was due to a custom format being defined in the HTTPX stub.
2024-01-22 23:13:10 -03:00
Thomas Grainger
8e13af2ee9
use context manager for requests.Session
2023-12-15 18:38:56 +00:00
Thomas Grainger
80614dbd00
fix resource warning due to pytest-asyncio
2023-12-15 13:51:52 +00:00
Thomas Grainger
356ff4122c
fix sync do_request().stream
2023-12-15 13:40:06 +00:00
Thomas Grainger
cf765928ac
remove redundant contextlib import
2023-12-15 13:35:31 +00:00
Thomas Grainger
73d11e80eb
fix httpx resource warnings
2023-12-15 13:34:52 +00:00
Thomas Grainger
895ae205ca
use asyncio.run to run coroutines
2023-12-15 11:39:51 +00:00
Thomas Grainger
f075c8b0b4
close aiohttp session on errors
2023-12-15 11:39:16 +00:00
Thomas Grainger
3919cb2573
remember to close the VCRHTTPSConnection
2023-12-15 11:08:49 +00:00
Thomas Grainger
bddec2e62a
use socketserver.ThreadingTCPServer as a contextmanager
2023-12-15 11:08:31 +00:00
Sebastian Pipping
1dd9cbde8b
pre-commit: Mass-apply trailing-whitespace
2023-12-12 20:01:09 +01:00
Jair Henrique
88cf01aa14
Fix format code
2023-12-12 14:24:22 -03:00
Parker Hancock
85ae012d9c
fix linting
2023-12-12 14:24:22 -03:00
Parker Hancock
db1e9e7180
make cassettes human readable
2023-12-12 14:24:22 -03:00
Sebastian Pipping
ecb5d84f0f
tests: Fix imports to tests/assertions.py
2023-12-11 00:36:46 +01:00
Parker Hancock
5532c0b4cf
more attempts to make the linters happy
2023-12-08 16:38:33 -03:00
Parker Hancock
f4467a8d6c
make linters happy
2023-12-08 16:38:33 -03:00