mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user