chore: remove sl_ tables (#28704)

This commit is contained in:
Maxime Beauchemin
2024-05-29 19:04:37 -07:00
committed by GitHub
parent 8d57a35531
commit 7dd28a9003
16 changed files with 202 additions and 737 deletions

View File

@@ -14,7 +14,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from unittest.mock import ANY, Mock, patch
from unittest.mock import ANY, patch
import pytest
@@ -132,21 +133,6 @@ class TestDatasourceApi(SupersetTestCase):
"database or `all_datasource_access` permission",
)
@patch("superset.datasource.api.DatasourceDAO.get_datasource")
def test_get_column_values_not_implemented_error(self, get_datasource_mock):
datasource = Mock()
datasource.values_for_column.side_effect = NotImplementedError
get_datasource_mock.return_value = datasource
self.login(ADMIN_USERNAME)
rv = self.client.get("api/v1/datasource/sl_table/1/column/col1/values/")
self.assertEqual(rv.status_code, 400)
response = json.loads(rv.data.decode("utf-8"))
self.assertEqual(
response["message"],
"Unable to get column values for datasource type: sl_table",
)
@pytest.mark.usefixtures("app_context", "virtual_dataset")
@patch("superset.models.helpers.ExploreMixin.values_for_column")
def test_get_column_values_normalize_columns_enabled(self, values_for_column_mock):