Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix test http client (#17262)
Iga Karbowiak4130011cfd5b
diff --git a/saleor/core/tests/cassettes/test_http_client/test_http_client_disallows_private_ip_ranges[http].yaml b/saleor/core/tests/cassettes/test_http_client/test_http_client_disallows_private_ip_ranges[http].yamlindex d4955631a0..b49be1ed3c 100644--- a/saleor/core/tests/cassettes/test_http_client/test_http_client_disallows_private_ip_ranges[http].yaml+++ b/saleor/core/tests/cassettes/test_http_client/test_http_client_disallows_private_ip_ranges[http].yaml@@ -13,11 +13,11 @@ interactions:User-Agent:- Saleor/3.21method: GET- uri: http://93.184.215.14/+ uri: http://23.215.0.136/response:body:string: !!binary |- H4sIAMIVqF0AA31UTXPbIBC9+1ds1UsyIyQnaRqPLWn6mWkPaQ9pDz0SsbKYCFAByfZ08t+7Qo4j+ H4sIAAAAAAAAAH1UTXPbIBC9+1ds1UsyIyQnaRqPLWn6mWkPaQ9pDz0SsbKYCFAByfZ08t+7Qo4jN5makYFdeLvvsZC9Eqb0uxah9qopZtljh1wUM6Bf5qVvsPi85aptED4ZxaXO0tE6G5co9BzKmluHPo86X7FFBGkxcdbetwx/d7LPo49Ge9SeDWEjKMdZHnnc+nQIvzpAvYSkucI86iVuWmP9ZP9GCl/nAntZIguTGKSWXvKGuZI3mJ89QTm/IzJDBvvApXPR6LszYgd/wjBMeXm/tqbTgpWmMXYJr6s5tfPV@@ -32,30 +32,24 @@ interactions:headers:Accept-Ranges:- bytes- Age:- - '458251'Cache-Control:- - max-age=604800+ - max-age=455+ Connection:+ - keep-aliveContent-Encoding:- gzipContent-Length:- '648'Content-Type:- - text/html; charset=UTF-8+ - text/htmlDate:- - Tue, 03 Dec 2024 09:52:20 GMT- Etag:- - '"3147526947"'- Expires:- - Tue, 10 Dec 2024 09:52:20 GMT+ - Wed, 15 Jan 2025 11:56:37 GMT+ ETag:+ - '"84238dfc8092e5d9c0dac8ef93371a07:1736799080.121134"'Last-Modified:- - Thu, 17 Oct 2019 07:18:26 GMT- Server:- - ECAcc (nyd/D188)+ - Mon, 13 Jan 2025 20:11:20 GMTVary:- Accept-Encoding- X-Cache:- - HITstatus:code: 200message: OKdiff --git a/saleor/core/tests/cassettes/test_http_client/test_http_client_disallows_private_ip_ranges[https].yaml b/saleor/core/tests/cassettes/test_http_client/test_http_client_disallows_private_ip_ranges[https].yamlindex bd86664e4b..dc54516399 100644--- a/saleor/core/tests/cassettes/test_http_client/test_http_client_disallows_private_ip_ranges[https].yaml+++ b/saleor/core/tests/cassettes/test_http_client/test_http_client_disallows_private_ip_ranges[https].yaml@@ -13,11 +13,11 @@ interactions:User-Agent:- Saleor/3.21method: GET- uri: https://93.184.215.14/+ uri: https://23.215.0.136/response:body:string: !!binary |- H4sIAMIVqF0AA31UTXPbIBC9+1ds1UsyIyQnaRqPLWn6mWkPaQ9pDz0SsbKYCFAByfZ08t+7Qo4j+ H4sIAAAAAAAAAH1UTXPbIBC9+1ds1UsyIyQnaRqPLWn6mWkPaQ9pDz0SsbKYCFAByfZ08t+7Qo4jN5makYFdeLvvsZC9Eqb0uxah9qopZtljh1wUM6Bf5qVvsPi85aptED4ZxaXO0tE6G5co9BzKmluHPo86X7FFBGkxcdbetwx/d7LPo49Ge9SeDWEjKMdZHnnc+nQIvzpAvYSkucI86iVuWmP9ZP9GCl/nAntZIguTGKSWXvKGuZI3mJ89QTm/IzJDBvvApXPR6LszYgd/wjBMeXm/tqbTgpWmMXYJr6s5tfPV@@ -32,30 +32,27 @@ interactions:headers:Accept-Ranges:- bytes- Age:- - '400176'+ Alt-Svc:+ - h3=":443"; ma=93600,h3-29=":443"; ma=93600,h3-Q050=":443"; ma=93600,quic=":443";+ ma=93600; v="46,43"Cache-Control:- - max-age=604800+ - max-age=471+ Connection:+ - keep-aliveContent-Encoding:- gzipContent-Length:- '648'Content-Type:- - text/html; charset=UTF-8+ - text/htmlDate:- - Tue, 03 Dec 2024 09:52:42 GMT- Etag:- - '"3147526947+gzip"'- Expires:- - Tue, 10 Dec 2024 09:52:42 GMT+ - Wed, 15 Jan 2025 11:56:37 GMT+ ETag:+ - '"84238dfc8092e5d9c0dac8ef93371a07:1736799080.121134"'Last-Modified:- - Thu, 17 Oct 2019 07:18:26 GMT- Server:- - ECAcc (nyd/D120)+ - Mon, 13 Jan 2025 20:11:20 GMTVary:- Accept-Encoding- X-Cache:- - HITstatus:code: 200message: OKdiff --git a/saleor/core/tests/test_http_client.py b/saleor/core/tests/test_http_client.pyindex 2cce2a6b0d..9cc6262957 100644--- a/saleor/core/tests/test_http_client.py+++ b/saleor/core/tests/test_http_client.py@@ -21,7 +21,7 @@ def test_user_agent_override():assert request.headers.get("User-Agent") == user_agent_version[email protected](match_on=["method", "scheme", "port", "path", "query"])@pytest.mark.parametrize("protocol", ["https", "http"])def test_http_client_disallows_private_ip_ranges(protocol):"""Ensure requests made to private IP address ranges leads to an error to be raised.