mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat: refactor all get_sqla_engine to use contextmanager in codebase (#21943)
This commit is contained in:
@@ -51,8 +51,8 @@ def load_unicode_data():
|
||||
|
||||
yield
|
||||
with app.app_context():
|
||||
engine = get_example_database().get_sqla_engine()
|
||||
engine.execute("DROP TABLE IF EXISTS unicode_test")
|
||||
with get_example_database().get_sqla_engine_with_context() as engine:
|
||||
engine.execute("DROP TABLE IF EXISTS unicode_test")
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
|
||||
Reference in New Issue
Block a user