docstr: Test that only datasets are exported when export_related=False.
docstr_tok: ["Test","that","only","datasets","are","exported","when","export_related=False","."]
code: def test_export_dataset_command_no_related(self, mock_g):
      """
      Test that only datasets are exported when export_related=False.
      """
      mock_g.user = security_manager.find_user("admin")
  
      example_db = get_example_database()
      example_dataset = _get_table_from_list_by_name(
          "energy_usage", example_db.tables
      )
      command = ExportDatasetsCommand(
          [example_dataset.id], export_related=False
      )
      contents = dict(command.run())
  
      assert list(contents.keys()) == [
          "metadata.yaml",
          "datasets/examples/energy_usage.yaml",
      ]
  
imports: from operator import itemgetter
  from typing import Any
  from unittest.mock import patch
  import pytest
  import yaml
  from sqlalchemy.exc import SQLAlchemyError
  from superset import db, security_manager
  from superset.commands.database.importers.v1 import ImportDatabasesCommand
  from superset.commands.dataset.create import CreateDatasetCommand
  from superset.commands.dataset.exceptions import DatasetInvalidError, DatasetNotFoundError, WarmUpCacheTableNotFoundError
  from superset.commands.dataset.export import ExportDatasetsCommand
  from superset.commands.dataset.importers import v0, v1
  from superset.commands.dataset.warm_up_cache import DatasetWarmUpCacheCommand
  from superset.commands.exceptions import CommandInvalidError
  from superset.commands.importers.exceptions import IncorrectVersionError
  from superset.connectors.sqla.models import SqlaTable
  from superset.models.core import Database
  from superset.models.slice import Slice
  from superset.utils.core import get_example_default_schema, override_user
  from superset.utils.database import get_example_database
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from tests.integration_tests.fixtures.energy_dashboard import load_energy_table_data, load_energy_table_with_slice
  from tests.integration_tests.fixtures.importexport import database_config, database_metadata_config, dataset_cli_export, dataset_config, dataset_metadata_config, dataset_ui_export
  from tests.integration_tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices, load_world_bank_data
label_desc: Use image node_id 5 for calling the TestExportDatasetsCommand obj's underlying member method code with example usage: obj.test_export_dataset_command_no_related(mock_g) without return types