henry3260 opened a new pull request, #11993:
URL: https://github.com/apache/gravitino/pull/11993

   ### What changes were proposed in this pull request?
   
   - Add shared Python client unit test fixtures for metalake operation tests.
   - Move repeated user, group, and role DTO builders into 
`operation_test_fixtures.py`.
   - Share the `GravitinoClient` test instance creation and `get_metalake` mock 
setup across user, group, and role delegate tests.
   - Update metalake user/group/role unit tests to reuse the shared helpers 
instead of duplicating setup code.
   
   ### Why are the changes needed?
   
   The metalake user, group, and role operation unit tests duplicated similar 
DTO construction and client mock setup code. This contributes to the Python 
client's duplicate-code pylint cleanup work and makes the tests harder to keep 
consistent.
   
   Centralizing these fixtures reduces repeated test boilerplate while keeping 
the tested behavior unchanged.
   
   Related to #3767.
   
   ### Does this PR introduce *any* user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   - `PYTHONPATH=. /private/tmp/gravitino-client-python-test-venv/bin/python -m 
unittest tests.unittests.client.test_metalake_user_operations 
tests.unittests.client.test_metalake_group_operations 
tests.unittests.client.test_metalake_role_operations`
     - Result: `Ran 54 tests`, `OK`
   - `PYTHONPATH=. PYLINTHOME=/private/tmp/gravitino-pylint-cache 
/private/tmp/gravitino-client-python-test-venv/bin/pylint --rcfile=pylintrc 
--persistent=n tests/unittests/client/operation_test_fixtures.py 
tests/unittests/client/test_metalake_user_operations.py 
tests/unittests/client/test_metalake_group_operations.py 
tests/unittests/client/test_metalake_role_operations.py`
     - Result: `10.00/10`
   - `git diff --check`


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