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,9 +18,11 @@
import prison
import pytest
from flask import escape # noqa: F401
from flask import (
current_app,
escape, # noqa: F401
)
from superset import app
from superset.daos.dashboard import DashboardDAO
from superset.utils import json
from tests.integration_tests.constants import ADMIN_USERNAME, GAMMA_USERNAME
@@ -37,7 +39,7 @@ from tests.integration_tests.fixtures.energy_dashboard import (
class TestDashboardDatasetSecurity(DashboardTestCase):
@pytest.fixture
def load_dashboard(self):
with app.app_context():
with current_app.app_context():
table = (
db.session.query(SqlaTable).filter_by(table_name="energy_usage").one() # noqa: F405
)