code: def test_import_database_sqlite_invalid(
      mocker: MockFixture, session: Session
  ) -> None:
      """
      Test importing a database.
      """
      from superset import app, security_manager
      from superset.commands.database.importers.v1.utils import (
          import_database,
      )
      from superset.models.core import Database
      from tests.integration_tests.fixtures.importexport import (
          database_config_sqlite,
      )
  
      app.config["PREVENT_UNSAFE_DB_CONNECTIONS"] = True
      mocker.patch.object(
          security_manager, "can_access", return_value=True
      )
  
      engine = session.get_bind()
      Database.metadata.create_all(engine)  # pylint: disable=no-member
  
      config = copy.deepcopy(database_config_sqlite)
      with pytest.raises(ImportFailedError) as excinfo:
          _ = import_database(session, config)
      assert (
          str(excinfo.value)
          == "SQLiteDialect_pysqlite cannot be used as a data source for security reasons."
      )
      # restore app config
      app.config["PREVENT_UNSAFE_DB_CONNECTIONS"] = True
  
file_path: superset/tests/unit_tests/databases/commands/importers/v1/import_test.py
imports: import copy
  import json
  import pytest
  from pytest_mock import MockFixture
  from sqlalchemy.orm.session import Session
  from superset.commands.exceptions import ImportFailedError
label_desc: Use image node_id 2 for calling a global function with example usage: test_import_database_sqlite_invalid(mocker, session) without return types