chore: proper current_app.config proxy usage (#34345)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Maxime Beauchemin
2025-07-31 19:27:42 -07:00
committed by GitHub
parent 6c9cda758a
commit cb27d5fe8d
144 changed files with 1428 additions and 1119 deletions

View File

@@ -19,9 +19,10 @@ from unittest.mock import Mock, patch
import pandas as pd
import pytest
from flask import current_app
from flask_babel import gettext as __
from superset import app, db, sql_lab
from superset import db, sql_lab
from superset.commands.sql_lab import estimate, export, results
from superset.common.db_query_status import QueryStatus
from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
@@ -89,7 +90,7 @@ class TestQueryEstimationCommand(SupersetTestCase):
assert ex_info.value.error.message == __(
"The query estimation was killed after %(sqllab_timeout)s seconds. It might " # noqa: E501
"be too complex, or the database might be under heavy load.",
sqllab_timeout=app.config["SQLLAB_QUERY_COST_ESTIMATE_TIMEOUT"],
sqllab_timeout=current_app.config["SQLLAB_QUERY_COST_ESTIMATE_TIMEOUT"],
)
def test_run_success(self) -> None: