File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626from requests .adapters import HTTPAdapter
2727from requests .exceptions import HTTPError
2828from requests_mock import Mocker
29- from requests_mock .request import _RequestObjectProxy
30- from requests_mock .response import _Context
3129
3230import pyiceberg
3331from pyiceberg .catalog import PropertiesUpdateSummary , load_catalog
@@ -1644,18 +1642,6 @@ def test_update_namespace_properties_invalid_namespace(rest_mock: Mocker) -> Non
16441642
16451643
16461644def test_with_disabled_ssl_ca_bundle (rest_mock : Mocker ) -> None :
1647- from pydantic import ValidationError
1648-
1649- def ssl_check_callback (req : _RequestObjectProxy , _ : _Context ) -> None :
1650- if req .verify :
1651- raise AssertionError ("SSL verification is still enabled" )
1652-
1653- # Given
1654- rest_mock .get (
1655- f"{ TEST_URI } v1/config" ,
1656- json = ssl_check_callback ,
1657- status_code = 200 ,
1658- )
16591645 # Given
16601646 catalog_properties = {
16611647 "uri" : TEST_URI ,
@@ -1664,8 +1650,8 @@ def ssl_check_callback(req: _RequestObjectProxy, _: _Context) -> None:
16641650 "cabundle" : False ,
16651651 },
16661652 }
1667- with pytest . raises ( ValidationError ) as _ :
1668- RestCatalog ( "rest" , ** catalog_properties ) # type: ignore
1653+ catalog = RestCatalog ( "rest" , ** catalog_properties ) # type: ignore
1654+ assert catalog . _session . verify is False
16691655
16701656
16711657def test_request_session_with_ssl_ca_bundle (monkeypatch : pytest .MonkeyPatch ) -> None :
You can’t perform that action at this time.
0 commit comments