docstr: Test that only the dashboard is exported when export_related=False.
docstr_tok: ["Test","that","only","the","dashboard","is","exported","when","export_related=False","."]
code: def test_export_dashboard_command_no_related(self, mock_g1, mock_g2):
      """
      Test that only the dashboard is exported when export_related=False.
      """
      mock_g1.user = security_manager.find_user("admin")
      mock_g2.user = security_manager.find_user("admin")
  
      example_dashboard = (
          db.session.query(Dashboard)
          .filter_by(slug="world_health")
          .one()
      )
      command = ExportDashboardsCommand(
          [example_dashboard.id], export_related=False
      )
      contents = dict(command.run())
  
      expected_paths = {
          "metadata.yaml",
          f"dashboards/World_Banks_Data_{example_dashboard.id}.yaml",
      }
      assert expected_paths == set(contents.keys())
  
imports: import itertools
  import json
  from unittest.mock import MagicMock, patch
  import pytest
  import yaml
  from werkzeug.utils import secure_filename
  from superset import db, security_manager
  from superset.commands.dashboard.exceptions import DashboardNotFoundError
  from superset.commands.dashboard.export import append_charts, ExportDashboardsCommand, get_default_position
  from superset.commands.dashboard.importers import v0, v1
  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.dashboard import Dashboard
  from superset.models.slice import Slice
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.importexport import chart_config, dashboard_config, dashboard_export, dashboard_metadata_config, database_config, dataset_config, dataset_metadata_config
  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 6 for calling the TestExportDashboardsCommand obj's underlying member method code with example usage: obj.test_export_dashboard_command_no_related(mock_g1, mock_g2) without return types