code: def test_update_with_password_mask(
      app: Any,
      session: Session,
      client: Any,
      full_api_access: None,
  ) -> None:
      """
      Test that an update with a masked password doesn't overwrite the existing password.
      """
      from superset.databases.api import DatabaseRestApi
      from superset.models.core import Database
  
      DatabaseRestApi.datamodel.session = session
  
      # create table for databases
      Database.metadata.create_all(
          session.get_bind()
      )  # pylint: disable=no-member
  
      database = Database(
          database_name="my_database",
          sqlalchemy_uri="gsheets://",
          encrypted_extra=json.dumps(
              {
                  "service_account_info": {
                      "project_id": "black-sanctum-314419",
                      "private_key": "SECRET",
                  },
              }
          ),
      )
      session.add(database)
      session.commit()
  
      client.put(
          "/api/v1/database/1",
          json={
              "encrypted_extra": json.dumps(
                  {
                      "service_account_info": {
                          "project_id": "yellow-unicorn-314419",
                          "private_key": "XXXXXXXXXX",
                      },
                  }
              ),
          },
      )
      database = session.query(Database).one()
      assert (
          database.encrypted_extra
          == '{"service_account_info": {"project_id": "yellow-unicorn-314419", "private_key": "SECRET"}}'
      )
  
file_path: superset/tests/unit_tests/databases/api_test.py
imports: import json
  from io import BytesIO
  from typing import Any
  from unittest.mock import Mock
  from uuid import UUID
  import pytest
  from flask import current_app
  from pytest_mock import MockFixture
  from sqlalchemy.orm.session import Session
label_desc: Use image node_id 5 for calling a global function with example usage: test_update_with_password_mask(app, session, client, full_api_access) without return types