mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(Trino): create PrestoBaseEngineSpec base class to share common code between Trino and Presto (#21066)
* chore: create `PrestoBaseEngineSpec` class that share common functions between Presto and Trino Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * feat(Trino): support CertificateAuthentication * chore(Presto): move `get_function_names` to `PrestoBaseEngineSpec` Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * chores(Presto): remove `is_readonly_query` * feat(Trino): implement `extra_table_metadata` * feat(Trino): specify `User-Agent` Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * fix: pylint Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * chores(Presto): move `PrestoBaseEngineSpec` to `presto.py` Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * fix(Presto): typing annotations Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
This commit is contained in:
@@ -188,7 +188,7 @@ class TestDatabaseModel(SupersetTestCase):
|
||||
call_args = mocked_create_engine.call_args
|
||||
|
||||
assert str(call_args[0][0]) == "trino://localhost"
|
||||
assert call_args[1]["connect_args"] == {"user": "gamma"}
|
||||
assert call_args[1]["connect_args"]["user"] == "gamma"
|
||||
|
||||
model = Database(
|
||||
database_name="test_database",
|
||||
@@ -203,7 +203,7 @@ class TestDatabaseModel(SupersetTestCase):
|
||||
str(call_args[0][0])
|
||||
== "trino://original_user:original_user_password@localhost"
|
||||
)
|
||||
assert call_args[1]["connect_args"] == {"user": "gamma"}
|
||||
assert call_args[1]["connect_args"]["user"] == "gamma"
|
||||
|
||||
@mock.patch("superset.models.core.create_engine")
|
||||
def test_impersonate_user_hive(self, mocked_create_engine):
|
||||
|
||||
Reference in New Issue
Block a user