chore: remove sqlparse (#33564)

This commit is contained in:
Beto Dealmeida
2025-06-04 19:31:41 -04:00
committed by GitHub
parent a7aa8f7cef
commit a26e1d822a
77 changed files with 488 additions and 3133 deletions

View File

@@ -16,7 +16,6 @@
# under the License.
from datetime import datetime
from typing import Any, Optional
from unittest.mock import MagicMock
import pytest
from sqlalchemy import column # noqa: F401
@@ -93,21 +92,3 @@ def test_opendistro_sqla_column_label(original: str, expected: str) -> None:
from superset.db_engine_specs.elasticsearch import OpenDistroEngineSpec
assert OpenDistroEngineSpec.make_label_compatible(original) == expected
def test_opendistro_strip_comments() -> None:
"""
DB Eng Specs (opendistro): Test execute sql strip comments
"""
from superset.db_engine_specs.elasticsearch import OpenDistroEngineSpec
mock_database = MagicMock()
mock_cursor = MagicMock()
mock_cursor.execute.return_value = []
OpenDistroEngineSpec.execute(
mock_cursor,
"-- some comment \nSELECT 1\n --other comment",
mock_database,
)
mock_cursor.execute.assert_called_once_with("SELECT 1\n")