mirror of
https://github.com/apache/superset.git
synced 2026-04-21 17:14:57 +00:00
feat: Update database permissions in async mode (#32231)
This commit is contained in:
@@ -887,7 +887,7 @@ class TestImportDatabasesCommand(SupersetTestCase):
|
||||
|
||||
|
||||
class TestTestConnectionDatabaseCommand(SupersetTestCase):
|
||||
@patch("superset.daos.database.Database._get_sqla_engine")
|
||||
@patch("superset.models.core.Database._get_sqla_engine")
|
||||
@patch("superset.commands.database.test_connection.event_logger.log_with_context")
|
||||
@patch("superset.utils.core.g")
|
||||
def test_connection_db_exception(
|
||||
@@ -908,7 +908,7 @@ class TestTestConnectionDatabaseCommand(SupersetTestCase):
|
||||
)
|
||||
mock_event_logger.assert_called()
|
||||
|
||||
@patch("superset.daos.database.Database._get_sqla_engine")
|
||||
@patch("superset.models.core.Database._get_sqla_engine")
|
||||
@patch("superset.commands.database.test_connection.event_logger.log_with_context")
|
||||
@patch("superset.utils.core.g")
|
||||
def test_connection_do_ping_exception(
|
||||
@@ -931,7 +931,7 @@ class TestTestConnectionDatabaseCommand(SupersetTestCase):
|
||||
== SupersetErrorType.GENERIC_DB_ENGINE_ERROR
|
||||
)
|
||||
|
||||
@patch("superset.utils.core.timeout")
|
||||
@patch("superset.commands.database.utils.timeout")
|
||||
@patch("superset.commands.database.test_connection.event_logger.log_with_context")
|
||||
@patch("superset.utils.core.g")
|
||||
def test_connection_do_ping_timeout(
|
||||
@@ -957,7 +957,7 @@ class TestTestConnectionDatabaseCommand(SupersetTestCase):
|
||||
== SupersetErrorType.CONNECTION_DATABASE_TIMEOUT
|
||||
)
|
||||
|
||||
@patch("superset.daos.database.Database._get_sqla_engine")
|
||||
@patch("superset.models.core.Database._get_sqla_engine")
|
||||
@patch("superset.commands.database.test_connection.event_logger.log_with_context")
|
||||
@patch("superset.utils.core.g")
|
||||
def test_connection_superset_security_connection(
|
||||
@@ -980,7 +980,7 @@ class TestTestConnectionDatabaseCommand(SupersetTestCase):
|
||||
|
||||
mock_event_logger.assert_called()
|
||||
|
||||
@patch("superset.daos.database.Database._get_sqla_engine")
|
||||
@patch("superset.models.core.Database._get_sqla_engine")
|
||||
@patch("superset.commands.database.test_connection.event_logger.log_with_context")
|
||||
@patch("superset.utils.core.g")
|
||||
def test_connection_db_api_exc(
|
||||
|
||||
Reference in New Issue
Block a user