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
2931
3032import pyiceberg
3133from pyiceberg .catalog import PropertiesUpdateSummary , load_catalog
4749 NoSuchViewError ,
4850 OAuthError ,
4951 ServerError ,
50- TableAlreadyExistsError , ValidationError ,
52+ TableAlreadyExistsError ,
5153)
5254from pyiceberg .io import load_file_io
5355from pyiceberg .partitioning import PartitionField , PartitionSpec
@@ -1643,9 +1645,11 @@ def test_update_namespace_properties_invalid_namespace(rest_mock: Mocker) -> Non
16431645
16441646def test_with_disabled_ssl_ca_bundle (rest_mock : Mocker ) -> None :
16451647 from pydantic import ValidationError
1646- def ssl_check_callback (req , _ ):
1648+
1649+ def ssl_check_callback (req : _RequestObjectProxy , _ : _Context ) -> None :
16471650 if req .verify :
16481651 raise AssertionError ("SSL verification is still enabled" )
1652+
16491653 # Given
16501654 rest_mock .get (
16511655 f"{ TEST_URI } v1/config" ,
@@ -1658,10 +1662,10 @@ def ssl_check_callback(req, _):
16581662 "token" : TEST_TOKEN ,
16591663 "ssl" : {
16601664 "cabundle" : False ,
1661- }
1665+ },
16621666 }
16631667 with pytest .raises (ValidationError ) as _ :
1664- RestCatalog ("rest" , ** catalog_properties )
1668+ RestCatalog ("rest" , ** catalog_properties ) # type: ignore
16651669
16661670
16671671def test_request_session_with_ssl_ca_bundle (monkeypatch : pytest .MonkeyPatch ) -> None :
0 commit comments