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

@@ -15,15 +15,13 @@
# specific language governing permissions and limitations
# under the License.
from superset.utils import json
from tests.integration_tests.test_app import app
from tests.conftest import with_config
@with_config({"SUPERSET_WEBSERVER_DOMAINS": ["a", "b"]})
def test_get_available_domains(test_client, login_as_admin):
cached = app.config["SUPERSET_WEBSERVER_DOMAINS"]
app.config["SUPERSET_WEBSERVER_DOMAINS"] = ["a", "b"]
resp = test_client.get("api/v1/available_domains/")
assert resp.status_code == 200
data = json.loads(resp.data.decode("utf-8"))
result = data.get("result")
assert result == {"domains": ["a", "b"]}
app.config["SUPERSET_WEBSERVER_DOMAINS"] = cached