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

@@ -18,8 +18,9 @@
from unittest.mock import patch
import pytest
from flask import current_app
from superset import app, db, security_manager
from superset import db, security_manager
from superset.commands.explore.permalink.create import CreateExplorePermalinkCommand
from superset.commands.explore.permalink.get import GetExplorePermalinkCommand
from superset.connectors.sqla.models import SqlaTable
@@ -112,7 +113,7 @@ class TestCreatePermalinkDataCommand(SupersetTestCase):
@pytest.mark.usefixtures("create_dataset", "create_slice")
def test_get_permalink_command(self, mock_g):
mock_g.user = security_manager.find_user("admin")
app.config["EXPLORE_FORM_DATA_CACHE_CONFIG"] = {
current_app.config["EXPLORE_FORM_DATA_CACHE_CONFIG"] = {
"REFRESH_TIMEOUT_ON_RETRIEVAL": True
}
@@ -140,7 +141,7 @@ class TestCreatePermalinkDataCommand(SupersetTestCase):
self, decode_id_mock, kv_get_value_mock, mock_g
):
mock_g.user = security_manager.find_user("admin")
app.config["EXPLORE_FORM_DATA_CACHE_CONFIG"] = {
current_app.config["EXPLORE_FORM_DATA_CACHE_CONFIG"] = {
"REFRESH_TIMEOUT_ON_RETRIEVAL": True
}