fix: calls to _get_sqla_engine (#24953)

(cherry picked from commit 6f24a4e7a8)
This commit is contained in:
Beto Dealmeida
2023-08-11 03:54:01 -07:00
committed by Michael S. Molina
parent 5d8c65ae6f
commit ff2ec23102
5 changed files with 36 additions and 37 deletions

View File

@@ -296,7 +296,8 @@ class TestDatabaseModel(SupersetTestCase):
db = get_example_database()
table_name = "energy_usage"
sql = db.select_star(table_name, show_cols=False, latest_partition=False)
quote = db.inspector.engine.dialect.identifier_preparer.quote_identifier
with db.get_sqla_engine_with_context() as engine:
quote = engine.dialect.identifier_preparer.quote_identifier
expected = (
textwrap.dedent(
f"""\