mirror of
https://github.com/apache/superset.git
synced 2026-06-02 06:09:21 +00:00
chore(command): Organize Commands according to SIP-92 (#25850)
This commit is contained in:
@@ -21,9 +21,9 @@ import pytest
|
||||
from flask_appbuilder.security.sqla.models import User
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from superset.commands.explore.form_data.state import TemporaryExploreState
|
||||
from superset.connectors.sqla.models import SqlaTable
|
||||
from superset.explore.exceptions import DatasetAccessDeniedError
|
||||
from superset.explore.form_data.commands.state import TemporaryExploreState
|
||||
from superset.extensions import cache_manager
|
||||
from superset.models.slice import Slice
|
||||
from tests.integration_tests.fixtures.world_bank_dashboard import (
|
||||
|
||||
@@ -21,9 +21,9 @@ import pytest
|
||||
from flask_appbuilder.security.sqla.models import User
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from superset.commands.dataset.exceptions import DatasetAccessDeniedError
|
||||
from superset.commands.explore.form_data.state import TemporaryExploreState
|
||||
from superset.connectors.sqla.models import SqlaTable
|
||||
from superset.datasets.commands.exceptions import DatasetAccessDeniedError
|
||||
from superset.explore.form_data.commands.state import TemporaryExploreState
|
||||
from superset.extensions import cache_manager
|
||||
from superset.models.slice import Slice
|
||||
from superset.utils.core import DatasourceType
|
||||
|
||||
@@ -22,12 +22,12 @@ import pytest
|
||||
|
||||
from superset import app, db, security, security_manager
|
||||
from superset.commands.exceptions import DatasourceTypeInvalidError
|
||||
from superset.commands.explore.form_data.create import CreateFormDataCommand
|
||||
from superset.commands.explore.form_data.delete import DeleteFormDataCommand
|
||||
from superset.commands.explore.form_data.get import GetFormDataCommand
|
||||
from superset.commands.explore.form_data.parameters import CommandParameters
|
||||
from superset.commands.explore.form_data.update import UpdateFormDataCommand
|
||||
from superset.connectors.sqla.models import SqlaTable
|
||||
from superset.explore.form_data.commands.create import CreateFormDataCommand
|
||||
from superset.explore.form_data.commands.delete import DeleteFormDataCommand
|
||||
from superset.explore.form_data.commands.get import GetFormDataCommand
|
||||
from superset.explore.form_data.commands.parameters import CommandParameters
|
||||
from superset.explore.form_data.commands.update import UpdateFormDataCommand
|
||||
from superset.models.slice import Slice
|
||||
from superset.models.sql_lab import Query
|
||||
from superset.utils.core import DatasourceType, get_example_default_schema
|
||||
|
||||
@@ -21,10 +21,10 @@ import pytest
|
||||
|
||||
from superset import app, db, security, security_manager
|
||||
from superset.commands.exceptions import DatasourceTypeInvalidError
|
||||
from superset.commands.explore.form_data.parameters import CommandParameters
|
||||
from superset.commands.explore.permalink.create import CreateExplorePermalinkCommand
|
||||
from superset.commands.explore.permalink.get import GetExplorePermalinkCommand
|
||||
from superset.connectors.sqla.models import SqlaTable
|
||||
from superset.explore.form_data.commands.parameters import CommandParameters
|
||||
from superset.explore.permalink.commands.create import CreateExplorePermalinkCommand
|
||||
from superset.explore.permalink.commands.get import GetExplorePermalinkCommand
|
||||
from superset.key_value.utils import decode_permalink_id
|
||||
from superset.models.slice import Slice
|
||||
from superset.models.sql_lab import Query
|
||||
@@ -138,8 +138,8 @@ class TestCreatePermalinkDataCommand(SupersetTestCase):
|
||||
assert cache_data.get("datasource") == datasource
|
||||
|
||||
@patch("superset.security.manager.g")
|
||||
@patch("superset.key_value.commands.get.GetKeyValueCommand.run")
|
||||
@patch("superset.explore.permalink.commands.get.decode_permalink_id")
|
||||
@patch("superset.commands.key_value.get.GetKeyValueCommand.run")
|
||||
@patch("superset.commands.explore.permalink.get.decode_permalink_id")
|
||||
@pytest.mark.usefixtures("create_dataset", "create_slice")
|
||||
def test_get_permalink_command_with_old_dataset_key(
|
||||
self, decode_id_mock, get_kv_command_mock, mock_g
|
||||
|
||||
Reference in New Issue
Block a user