mirror of
https://github.com/apache/superset.git
synced 2026-04-16 14:45:21 +00:00
chore: proper current_app.config proxy usage (#34345)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
6c9cda758a
commit
cb27d5fe8d
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user