class_docstr: Testing export import functionality for dashboards
class_docstr_tok: ["Testing","export","import","functionality","for","dashboards"]
code: def test_import_2_slices_for_same_table(self):
      schema = get_example_default_schema()
      table_id = self.get_table(name="wb_health_population").id
      slc_1 = self.create_slice(
          "Import Me 1", ds_id=table_id, id=10002, schema=schema
      )
      slc_id_1 = import_chart(slc_1, None)
      slc_2 = self.create_slice(
          "Import Me 2", ds_id=table_id, id=10003, schema=schema
      )
      slc_id_2 = import_chart(slc_2, None)
  
      imported_slc_1 = self.get_slice(slc_id_1)
      imported_slc_2 = self.get_slice(slc_id_2)
      self.assertEqual(table_id, imported_slc_1.datasource_id)
      self.assert_slice_equals(slc_1, imported_slc_1)
      self.assertEqual(
          imported_slc_1.datasource.perm, imported_slc_1.perm
      )
  
      self.assertEqual(table_id, imported_slc_2.datasource_id)
      self.assert_slice_equals(slc_2, imported_slc_2)
      self.assertEqual(
          imported_slc_2.datasource.perm, imported_slc_2.perm
      )
  
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 15 for calling the TestImportExport obj's underlying member method code with example usage: obj.test_import_2_slices_for_same_table() without return types