mirror of
https://github.com/apache/superset.git
synced 2026-04-17 15:15:20 +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
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user