mchades commented on code in PR #13863:
URL: https://github.com/apache/gravitino/pull/13863#discussion_r4283619854


##########
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:
   [P2] Supply an HTTP client to the visibility-test fixture
   
   `@mock_base.mock_data` returns a `GenericFileset` constructed with 
`rest_client=None`. Consequently, this test and 
`test_fileset_list_tags_info_with_visibility` fail with `AttributeError: 
'NoneType' object has no attribute 'get'` before reaching the patched 
`HTTPClient.get`. Both failures reproduce with `python -m unittest 
tests.unittests.test_tag_api`. Please provide an HTTP client in these fixtures 
so the tests exercise response parsing and flag propagation.



-- 
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]

Reply via email to