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

@@ -113,9 +113,10 @@ class BaseTestChartDataApi(SupersetTestCase):
def quote_name(self, name: str):
if get_main_database().backend in {"presto", "hive"}:
return get_example_database().inspector.engine.dialect.identifier_preparer.quote_identifier(
name
)
with get_example_database().get_inspector_with_context() as inspector: # E: Ne
return inspector.engine.dialect.identifier_preparer.quote_identifier(
name
)
return name