mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
refactor: Ensure Flask framework leverages the Flask-SQLAlchemy session (#26200)
This commit is contained in:
@@ -474,7 +474,7 @@ class TestDatasource(SupersetTestCase):
|
||||
|
||||
pytest.raises(
|
||||
DatasourceNotFound,
|
||||
lambda: DatasourceDAO.get_datasource(db.session, "table", 9999999),
|
||||
lambda: DatasourceDAO.get_datasource("table", 9999999),
|
||||
)
|
||||
|
||||
self.login(username="admin")
|
||||
@@ -486,7 +486,7 @@ class TestDatasource(SupersetTestCase):
|
||||
|
||||
pytest.raises(
|
||||
DatasourceTypeNotSupportedError,
|
||||
lambda: DatasourceDAO.get_datasource(db.session, "druid", 9999999),
|
||||
lambda: DatasourceDAO.get_datasource("druid", 9999999),
|
||||
)
|
||||
|
||||
self.login(username="admin")
|
||||
|
||||
@@ -145,7 +145,6 @@ class TestQueryContext(SupersetTestCase):
|
||||
|
||||
# make temporary change and revert it to refresh the changed_on property
|
||||
datasource = DatasourceDAO.get_datasource(
|
||||
session=db.session,
|
||||
datasource_type=DatasourceType(payload["datasource"]["type"]),
|
||||
datasource_id=payload["datasource"]["id"],
|
||||
)
|
||||
@@ -169,7 +168,6 @@ class TestQueryContext(SupersetTestCase):
|
||||
|
||||
# make temporary change and revert it to refresh the changed_on property
|
||||
datasource = DatasourceDAO.get_datasource(
|
||||
session=db.session,
|
||||
datasource_type=DatasourceType(payload["datasource"]["type"]),
|
||||
datasource_id=payload["datasource"]["id"],
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user