fix: sqlparse fallback for formatting queries (#30578)

This commit is contained in:
Beto Dealmeida
2024-10-11 15:45:40 -04:00
committed by GitHub
parent 9a2b1a5cf7
commit 47c1e09c75
4 changed files with 125 additions and 35 deletions

View File

@@ -281,7 +281,7 @@ class TestSqlLabApi(SupersetTestCase):
"/api/v1/sqllab/format_sql/",
json=data,
)
success_resp = {"result": "SELECT\n 1\nFROM my_table"}
success_resp = {"result": "SELECT 1\nFROM my_table"}
resp_data = json.loads(rv.data.decode("utf-8"))
self.assertDictEqual(resp_data, success_resp) # noqa: PT009
assert rv.status_code == 200