roryqi commented on code in PR #13863:
URL: https://github.com/apache/gravitino/pull/13863#discussion_r4284069868
##########
clients/client-python/tests/unittests/test_tag_api.py:
##########
@@ -590,6 +598,24 @@ def test_fileset_list_tags(self, *mock_method) -> None:
self.assertIn("tagA", tags)
self.assertIn("tagB", tags)
+ def test_fileset_list_tags_with_visibility(self, *mock_method) -> None:
+ """Test listing visible tag names and authorization-filtering
status."""
+ client = GravitinoClient(
+ uri="http://localhost:8090",
+ metalake_name=self._metalake_name,
+ check_version=False,
+ )
+ fileset = self._load_fileset(client)
+ response = TagNamesListResponse(0, ["tagA"], True)
+
+ with patch(
+ "gravitino.utils.http_client.HTTPClient.get",
+ return_value=mock_base.mock_http_response(response.to_json()),
+ ):
+ tag_list = fileset.list_tags_with_visibility()
Review Comment:
Addressed in 548bb9580a. The shared fileset fixture now constructs
GenericFileset with a real HTTPClient, so both visibility tests reach the
patched HTTPClient.get and exercise response parsing and flag propagation.
Verified with python3 -m unittest tests.unittests.test_tag_api: all 30 tests
pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]