class_docstr: Testing export import functionality for dashboards
class_docstr_tok: ["Testing","export","import","functionality","for","dashboards"]
code: def assert_datasource_equals(self, expected_ds, actual_ds):
      self.assertEqual(
          expected_ds.datasource_name, actual_ds.datasource_name
      )
      self.assertEqual(
          expected_ds.main_dttm_col, actual_ds.main_dttm_col
      )
      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 uuid import uuid4
  import yaml
  from tests.integration_tests.test_app import app
  from superset import db
  from superset.connectors.sqla.models import SqlaTable, SqlMetric, TableColumn
  from superset.utils.database import get_example_database
  from superset.utils.dict_import_export import export_to_dict
  from .base_tests import SupersetTestCase
label_desc: Use image node_id 7 for calling the TestDictImportExport obj's underlying member method code with example usage: obj.assert_datasource_equals(expected_ds, actual_ds) without return types