mirror of
https://github.com/apache/superset.git
synced 2026-04-23 01:55:09 +00:00
feat: deprecate /superset/validate_sql_json migrate to api v1 (#19935)
* feat: deprecate /superset/validate_sql_json migrate to api v1 * use new error handling * migrate SQLLAb frontend and add tests * debug test * debug test * fix frontend test on sqllab * fix tests * fix frontend test on sqllab * fix tests * fix tests * fix tests * fix tests
This commit is contained in:
committed by
GitHub
parent
9376940282
commit
87a4379d0a
@@ -48,13 +48,16 @@ class TestSqlValidatorEndpoint(SupersetTestCase):
|
||||
def tearDown(self):
|
||||
self.logout()
|
||||
|
||||
@patch.dict(
|
||||
"superset.config.SQL_VALIDATORS_BY_ENGINE",
|
||||
{},
|
||||
clear=True,
|
||||
)
|
||||
def test_validate_sql_endpoint_noconfig(self):
|
||||
"""Assert that validate_sql_json errors out when no validators are
|
||||
configured for any db"""
|
||||
self.login("admin")
|
||||
|
||||
app.config["SQL_VALIDATORS_BY_ENGINE"] = {}
|
||||
|
||||
resp = self.validate_sql(
|
||||
"SELECT * FROM birth_names", client_id="1", raise_on_error=False
|
||||
)
|
||||
@@ -231,6 +234,11 @@ class TestPrestoValidator(SupersetTestCase):
|
||||
|
||||
self.assertEqual(1, len(errors))
|
||||
|
||||
@patch.dict(
|
||||
"superset.config.SQL_VALIDATORS_BY_ENGINE",
|
||||
{},
|
||||
clear=True,
|
||||
)
|
||||
def test_validate_sql_endpoint(self):
|
||||
self.login("admin")
|
||||
# NB this is effectively an integration test -- when there's a default
|
||||
|
||||
Reference in New Issue
Block a user