Skip to content

Commit

Permalink
one more time
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Jan 4, 2023
1 parent c13d781 commit 26cf408
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/integration_tests/core_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
load_world_bank_dashboard_with_slices,
load_world_bank_data,
)
from tests.integration_tests.conftest import CTAS_SCHEMA_NAME

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -1673,6 +1674,22 @@ def test_explore_redirect(self, mock_command: mock.Mock):
)
self.assertRedirects(rv, f"/explore/?form_data_key={random_key}")

def test_has_table_by_name(self):
from tests.integration_tests.conftest import CTAS_SCHEMA_NAME

example_db = superset.utils.database.get_example_database()
with example_db.get_sqla_engine_with_context() as engine:
engine.execute(
f"CREATE TABLE {CTAS_SCHEMA_NAME}.birth_names AS SELECT 2 as two"
)

assert (
example_db.has_table_by_name(
table_name="birth_names", schema=CTAS_SCHEMA_NAME
)
is True
)


if __name__ == "__main__":
unittest.main()

0 comments on commit 26cf408

Please sign in to comment.