class_docstr: Testing export import functionality for dashboards
class_docstr_tok: ["Testing","export","import","functionality","for","dashboards"]
code: def test_import_table_override_identical(self):
      table, dict_table = self.create_table(
          "copy_cat",
          id=ID_PREFIX + 4,
          cols_names=["new_col1", "col2", "col3"],
          metric_names=["new_metric1"],
      )
      imported_table = SqlaTable.import_from_dict(
          db.session, dict_table
      )
      db.session.commit()
      copy_table, dict_copy_table = self.create_table(
          "copy_cat",
          id=ID_PREFIX + 4,
          cols_names=["new_col1", "col2", "col3"],
          metric_names=["new_metric1"],
      )
      imported_copy_table = SqlaTable.import_from_dict(
          db.session, dict_copy_table
      )
      db.session.commit()
      self.assertEqual(imported_table.id, imported_copy_table.id)
      self.assert_table_equals(
          copy_table, self.get_table_by_id(imported_table.id)
      )
      self.yaml_compare(
          imported_copy_table.export_to_dict(),
          imported_table.export_to_dict(),
      )
  
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 13 for calling the TestDictImportExport obj's underlying member method code with example usage: obj.test_import_table_override_identical() without return types