hussein-awala commented on code in PR #423: URL: https://github.com/apache/iceberg-python/pull/423#discussion_r1488694863
########## tests/utils/test_config.py: ########## @@ -41,6 +41,11 @@ def test_from_environment_variables_uppercase() -> None: assert Config().get_catalog_config("PRODUCTION") == {"uri": "https://service.io/api"} +@mock.patch.dict(os.environ, {"PYICEBERG_CATALOG__PRODUCTION__S3__REGION": "eu-north-1"}) +def test_fix_nested_objects_from_environment_variables() -> None: + assert Config().get_catalog_config("PRODUCTION") == {'s3.region': 'eu-north-1'} Review Comment: It would be better if we add a check for the second replace (`.replace("_", "-")`) ```suggestion @mock.patch.dict(os.environ, { "PYICEBERG_CATALOG__PRODUCTION__S3__REGION": "eu-north-1", "PYICEBERG_CATALOG__PRODUCTION__S3__ACCESS_KEY_ID": "username", }) def test_fix_nested_objects_from_environment_variables() -> None: assert Config().get_catalog_config("PRODUCTION") == { 's3.region': 'eu-north-1', 's3.access-key-id': 'username', } ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org