code: def test_rename_encrypted_extra() -> None:
      """
      Test that ``encrypted_extra`` gets renamed to ``masked_encrypted_extra``.
      """
      from superset.databases.schemas import (
          ConfigurationMethod,
          DatabasePostSchema,
      )
  
      schema = DatabasePostSchema()
  
      # current schema
      payload = schema.load(
          {
              "database_name": "My database",
              "masked_encrypted_extra": "{}",
          }
      )
      assert payload == {
          "database_name": "My database",
          "configuration_method": ConfigurationMethod.SQLALCHEMY_FORM,
          "masked_encrypted_extra": "{}",
      }
  
      # previous schema
      payload = schema.load(
          {
              "database_name": "My database",
              "encrypted_extra": "{}",
          }
      )
      assert payload == {
          "database_name": "My database",
          "configuration_method": ConfigurationMethod.SQLALCHEMY_FORM,
          "masked_encrypted_extra": "{}",
      }
  
file_path: superset/tests/unit_tests/databases/schema_tests.py
imports: from typing import TYPE_CHECKING
  import pytest
  from marshmallow import fields, Schema, ValidationError
  from pytest_mock import MockFixture
label_desc: Use image node_id 8 for calling a global function with example usage: test_rename_encrypted_extra() without return types