@@ -121,6 +121,9 @@ def test_no_uri_supplied() -> None:
121121 RestCatalog ("production" )
122122
123123
124+ @pytest .mark .filterwarnings (
125+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
126+ )
124127def test_token_200 (rest_mock : Mocker ) -> None :
125128 rest_mock .post (
126129 f"{ TEST_URI } v1/oauth/tokens" ,
@@ -141,6 +144,9 @@ def test_token_200(rest_mock: Mocker) -> None:
141144 )
142145
143146
147+ @pytest .mark .filterwarnings (
148+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
149+ )
144150def test_token_200_without_optional_fields (rest_mock : Mocker ) -> None :
145151 rest_mock .post (
146152 f"{ TEST_URI } v1/oauth/tokens" ,
@@ -157,6 +163,9 @@ def test_token_200_without_optional_fields(rest_mock: Mocker) -> None:
157163 )
158164
159165
166+ @pytest .mark .filterwarnings (
167+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
168+ )
160169def test_token_with_optional_oauth_params (rest_mock : Mocker ) -> None :
161170 mock_request = rest_mock .post (
162171 f"{ TEST_URI } v1/oauth/tokens" ,
@@ -179,6 +188,9 @@ def test_token_with_optional_oauth_params(rest_mock: Mocker) -> None:
179188 assert TEST_RESOURCE in mock_request .last_request .text
180189
181190
191+ @pytest .mark .filterwarnings (
192+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
193+ )
182194def test_token_with_optional_oauth_params_as_empty (rest_mock : Mocker ) -> None :
183195 mock_request = rest_mock .post (
184196 f"{ TEST_URI } v1/oauth/tokens" ,
@@ -199,6 +211,9 @@ def test_token_with_optional_oauth_params_as_empty(rest_mock: Mocker) -> None:
199211 assert TEST_RESOURCE not in mock_request .last_request .text
200212
201213
214+ @pytest .mark .filterwarnings (
215+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
216+ )
202217def test_token_with_default_scope (rest_mock : Mocker ) -> None :
203218 mock_request = rest_mock .post (
204219 f"{ TEST_URI } v1/oauth/tokens" ,
@@ -217,6 +232,9 @@ def test_token_with_default_scope(rest_mock: Mocker) -> None:
217232 assert "catalog" in mock_request .last_request .text
218233
219234
235+ @pytest .mark .filterwarnings (
236+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
237+ )
220238def test_token_with_custom_scope (rest_mock : Mocker ) -> None :
221239 mock_request = rest_mock .post (
222240 f"{ TEST_URI } v1/oauth/tokens" ,
@@ -236,6 +254,9 @@ def test_token_with_custom_scope(rest_mock: Mocker) -> None:
236254 assert TEST_SCOPE in mock_request .last_request .text
237255
238256
257+ @pytest .mark .filterwarnings (
258+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
259+ )
239260def test_token_200_w_auth_url (rest_mock : Mocker ) -> None :
240261 rest_mock .post (
241262 TEST_AUTH_URL ,
@@ -258,6 +279,9 @@ def test_token_200_w_auth_url(rest_mock: Mocker) -> None:
258279 # pylint: enable=W0212
259280
260281
282+ @pytest .mark .filterwarnings (
283+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
284+ )
261285def test_config_200 (requests_mock : Mocker ) -> None :
262286 requests_mock .get (
263287 f"{ TEST_URI } v1/config" ,
@@ -343,6 +367,9 @@ def test_config_sets_headers(requests_mock: Mocker) -> None:
343367 )
344368
345369
370+ @pytest .mark .filterwarnings (
371+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
372+ )
346373def test_token_400 (rest_mock : Mocker ) -> None :
347374 rest_mock .post (
348375 f"{ TEST_URI } v1/oauth/tokens" ,
@@ -356,6 +383,9 @@ def test_token_400(rest_mock: Mocker) -> None:
356383 assert str (e .value ) == "invalid_client: Credentials for key invalid_key do not match"
357384
358385
386+ @pytest .mark .filterwarnings (
387+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
388+ )
359389def test_token_401 (rest_mock : Mocker ) -> None :
360390 message = "invalid_client"
361391 rest_mock .post (
@@ -489,6 +519,9 @@ def test_list_namespace_with_parent_200(rest_mock: Mocker) -> None:
489519 ]
490520
491521
522+ @pytest .mark .filterwarnings (
523+ "ignore:Deprecated in 0.8.0, will be removed in 1.0.0. Iceberg REST client is missing the OAuth2 server URI:DeprecationWarning"
524+ )
492525def test_list_namespaces_token_expired (rest_mock : Mocker ) -> None :
493526 new_token = "new_jwt_token"
494527 new_header = dict (TEST_HEADERS )
0 commit comments