class_docstr: Testing export import functionality for dashboards
class_docstr_tok: ["Testing","export","import","functionality","for","dashboards"]
code: def assert_table_equals(self, expected_ds, actual_ds):
      self.assertEqual(expected_ds.table_name, actual_ds.table_name)
      self.assertEqual(
          expected_ds.main_dttm_col, actual_ds.main_dttm_col
      )
      self.assertEqual(expected_ds.schema, actual_ds.schema)
      self.assertEqual(len(expected_ds.metrics), len(actual_ds.metrics))
      self.assertEqual(len(expected_ds.columns), len(actual_ds.columns))
      self.assertEqual(
          {c.column_name for c in expected_ds.columns},
          {c.column_name for c in actual_ds.columns},
      )
      self.assertEqual(
          {m.metric_name for m in expected_ds.metrics},
          {m.metric_name for m in actual_ds.metrics},
      )
  
imports: import json
  import unittest
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  import pytest
  from flask import g
  from sqlalchemy.orm.session import make_transient
  from tests.integration_tests.fixtures.energy_dashboard import load_energy_table_with_slice, load_energy_table_data
  from tests.integration_tests.test_app import app
  from superset.commands.dashboard.importers.v0 import decode_dashboards
  from superset import db, security_manager
  from superset.connectors.sqla.models import SqlaTable, SqlMetric, TableColumn
  from superset.commands.dashboard.importers.v0 import import_chart, import_dashboard
  from superset.commands.dataset.importers.v0 import import_dataset
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.utils.core import DatasourceType, get_example_default_schema
  from superset.utils.database import get_example_database
  from tests.integration_tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices, load_world_bank_data
  from .base_tests import SupersetTestCase
label_desc: Use image node_id 8 for calling the TestImportExport obj's underlying member method code with example usage: obj.assert_table_equals(expected_ds, actual_ds) without return types