mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
refactor: Ensure Flask framework leverages the Flask-SQLAlchemy session (#26200)
This commit is contained in:
@@ -38,11 +38,6 @@ def app_config() -> dict[str, Any]:
|
||||
return create_app_config().copy()
|
||||
|
||||
|
||||
@fixture
|
||||
def session_factory() -> Mock:
|
||||
return Mock()
|
||||
|
||||
|
||||
@fixture
|
||||
def connector_registry() -> Mock:
|
||||
return Mock(spec=["get_datasource"])
|
||||
@@ -58,12 +53,12 @@ def apply_max_row_limit(limit: int, max_limit: Optional[int] = None) -> int:
|
||||
|
||||
@fixture
|
||||
def query_object_factory(
|
||||
app_config: dict[str, Any], connector_registry: Mock, session_factory: Mock
|
||||
app_config: dict[str, Any], connector_registry: Mock
|
||||
) -> QueryObjectFactory:
|
||||
import superset.common.query_object_factory as mod
|
||||
|
||||
mod.apply_max_row_limit = apply_max_row_limit
|
||||
return QueryObjectFactory(app_config, connector_registry, session_factory)
|
||||
return QueryObjectFactory(app_config, connector_registry)
|
||||
|
||||
|
||||
@fixture
|
||||
|
||||
Reference in New Issue
Block a user