class_docstr: Testing export import functionality for dashboards
class_docstr_tok: ["Testing","export","import","functionality","for","dashboards"]
code: def test_import_table_override(self):
      schema = get_example_default_schema()
      table = self.create_table(
          "table_override",
          id=10003,
          cols_names=["col1"],
          metric_names=["m1"],
          schema=schema,
      )
      db_id = get_example_database().id
      imported_id = import_dataset(table, db_id, import_time=1991)
  
      table_over = self.create_table(
          "table_override",
          id=10003,
          cols_names=["new_col1", "col2", "col3"],
          metric_names=["new_metric1"],
          schema=schema,
      )
      imported_over_id = import_dataset(
          table_over, db_id, import_time=1992
      )
  
      imported_over = self.get_table_by_id(imported_over_id)
      self.assertEqual(imported_id, imported_over.id)
      expected_table = self.create_table(
          "table_override",
          id=10003,
          metric_names=["new_metric1", "m1"],
          cols_names=["col1", "new_col1", "col2", "col3"],
          schema=schema,
      )
      self.assert_table_equals(expected_table, imported_over)
  
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 27 for calling the TestImportExport obj's underlying member method code with example usage: obj.test_import_table_override() without return types