mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(ssh-tunnel): fix dataset creation flow through modal for DB with tunnel (#22581)
This commit is contained in:
@@ -27,10 +27,12 @@ from typing import Dict, List
|
||||
from urllib.parse import quote
|
||||
|
||||
import superset.utils.database
|
||||
from superset.utils.core import backend
|
||||
from tests.integration_tests.fixtures.birth_names_dashboard import (
|
||||
load_birth_names_dashboard_with_slices,
|
||||
load_birth_names_data,
|
||||
)
|
||||
from sqlalchemy import Table
|
||||
|
||||
import pytest
|
||||
import pytz
|
||||
@@ -79,6 +81,7 @@ from tests.integration_tests.fixtures.world_bank_dashboard import (
|
||||
load_world_bank_dashboard_with_slices,
|
||||
load_world_bank_data,
|
||||
)
|
||||
from tests.integration_tests.conftest import CTAS_SCHEMA_NAME
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -1673,6 +1676,16 @@ class TestCore(SupersetTestCase):
|
||||
)
|
||||
self.assertRedirects(rv, f"/explore/?form_data_key={random_key}")
|
||||
|
||||
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
|
||||
def test_has_table_by_name(self):
|
||||
if backend() in ("sqlite", "mysql"):
|
||||
return
|
||||
example_db = superset.utils.database.get_example_database()
|
||||
assert (
|
||||
example_db.has_table_by_name(table_name="birth_names", schema="public")
|
||||
is True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user