eschutho commented on code in PR #21570:
URL: https://github.com/apache/superset/pull/21570#discussion_r978954771
##########
tests/unit_tests/db_engine_specs/test_bigquery.py:
##########
@@ -192,3 +192,36 @@ def test_unmask_encrypted_extra() -> None:
"private_key": "SECRET",
},
}
+
+
+def test_unmask_encrypted_extra_when_empty() -> None:
+ """
+ Test that a None value works for ``encrypted_extra``.
+ """
+ from superset.db_engine_specs.bigquery import BigQueryEngineSpec
+
+ old = None
+ new = json.dumps(
+ {
+ "credentials_info": {
+ "project_id": "yellow-unicorn-314419",
+ "private_key": "XXXXXXXXXX",
+ },
+ }
+ )
+
+ assert json.loads(BigQueryEngineSpec.unmask_encrypted_extra(old, new)) == {
Review Comment:
@betodealmeida is this the expected behavior? It doesn't unmask it if the
old value is None.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]