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
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
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
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
a77173c002
Use ruff as linter
2023-06-26 20:46:09 -03:00
Jochen Sprickerhof
7007e944ae
pytest.mark.online tests that need internet
2023-06-18 16:52:51 +02:00
Jair Henrique
14cef83c15
Move some tests to use mockbin instead httpbin
2023-05-11 17:03:54 -03:00
Jair Henrique
0eece7f96e
Add isort to code lint
2022-10-09 11:35:37 -03:00
immerrr
25f715bc42
Fix httpx support (select between allow_redirects/follow_redirects)
2022-04-19 09:32:25 -03:00
Hernan Ezequiel Di Giorgi
f387950486
support allow_redirects option
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
8529c46f00
update tests
...
- Use mockbin for redirections.
- Mock synchronous requests too.
2020-07-24 15:34:57 -05:00
Martynas Mickevičius
0ef400195b
Fix linter
2020-07-24 15:34:57 -05:00
Martynas Mickevičius
133423ce94
Reuse value from Location header on redirect
...
Because the recoded requests are using original value.
Changing the value on redirect prevents finding the
matching response.
2020-07-24 15:34:57 -05:00
Martynas Mickevičius
7d2d29de12
Extract cookies to client on every response
...
This is required because previous extraction code is now patched out by vcpy.
Also handle headers with same key in responses.
2020-07-24 15:34:57 -05:00
Martynas Mickevičius
023e41bb4c
Run tests on Travis CI
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
6ae93ac820
fix linting errors in test_httpx.py
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
04b7f4fc65
test that works behind proxy
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
936feb7748
fix redirection url
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
79d26ebb43
make it work with gzipped data
2020-07-24 15:34:57 -05:00
Hernan Ezequiel Di Giorgi
2f94d06e9b
add httpx support
2020-07-24 15:34:57 -05:00