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
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