amarlearning commented on code in PR #48791:
URL: https://github.com/apache/airflow/pull/48791#discussion_r2029211322


##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py:
##########
@@ -170,6 +170,22 @@ def test_get_should_respond_200_with_extra_redacted(self, 
test_client, session):
         assert body["conn_type"] == TEST_CONN_TYPE
         assert body["extra"] == '{"password": "***"}'
 
+    @pytest.mark.enable_redact
+    def test_get_should_respond_200_with_generic_connection(self, test_client, 
session):
+        connection = Connection(
+            conn_id=TEST_CONN_ID, conn_type="generic", login="a", 
password="a", extra='{"key": "value"}'
+        )
+        session.add(connection)
+        session.commit()
+
+        response = test_client.get(f"/connections/{TEST_CONN_ID}")
+        assert response.status_code == 200
+        body = response.json()
+        assert body["connection_id"] == TEST_CONN_ID
+        assert body["conn_type"] == "generic"
+        assert body["login"] == "a"
+        assert body["extra"] == '{"key": "value"}'
+

Review Comment:
   Going with name: `test_get_should_not_overmask_short_password_value_in_extra`



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