mirror of
https://github.com/apache/superset.git
synced 2026-04-09 03:16:07 +00:00
fix: feature flags typing (#15254)
* fix: feature flags typing * fix tests * add note in UPDATING.md * fix frontend * also move SCHEDULED_QUERIES to top level * fix test Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
This commit is contained in:
committed by
GitHub
parent
02a9b84b14
commit
69f9ee8f5e
@@ -34,13 +34,11 @@ from superset.utils.core import get_example_database
|
||||
|
||||
from .base_tests import SupersetTestCase
|
||||
|
||||
PRESTO_TEST_FEATURE_FLAGS = {
|
||||
"SQL_VALIDATORS_BY_ENGINE": {
|
||||
"presto": "PrestoDBSQLValidator",
|
||||
"sqlite": "PrestoDBSQLValidator",
|
||||
"postgresql": "PrestoDBSQLValidator",
|
||||
"mysql": "PrestoDBSQLValidator",
|
||||
}
|
||||
PRESTO_SQL_VALIDATORS_BY_ENGINE = {
|
||||
"presto": "PrestoDBSQLValidator",
|
||||
"sqlite": "PrestoDBSQLValidator",
|
||||
"postgresql": "PrestoDBSQLValidator",
|
||||
"mysql": "PrestoDBSQLValidator",
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +63,8 @@ class TestSqlValidatorEndpoint(SupersetTestCase):
|
||||
|
||||
@patch("superset.views.core.get_validator_by_name")
|
||||
@patch.dict(
|
||||
"superset.extensions.feature_flag_manager._feature_flags",
|
||||
PRESTO_TEST_FEATURE_FLAGS,
|
||||
"superset.config.SQL_VALIDATORS_BY_ENGINE",
|
||||
PRESTO_SQL_VALIDATORS_BY_ENGINE,
|
||||
clear=True,
|
||||
)
|
||||
def test_validate_sql_endpoint_mocked(self, get_validator_by_name):
|
||||
@@ -98,8 +96,8 @@ class TestSqlValidatorEndpoint(SupersetTestCase):
|
||||
|
||||
@patch("superset.views.core.get_validator_by_name")
|
||||
@patch.dict(
|
||||
"superset.extensions.feature_flag_manager._feature_flags",
|
||||
PRESTO_TEST_FEATURE_FLAGS,
|
||||
"superset.config.SQL_VALIDATORS_BY_ENGINE",
|
||||
PRESTO_SQL_VALIDATORS_BY_ENGINE,
|
||||
clear=True,
|
||||
)
|
||||
def test_validate_sql_endpoint_failure(self, get_validator_by_name):
|
||||
|
||||
Reference in New Issue
Block a user