You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/10/03 13:52:30 UTC

[superset] branch 3.0 updated: fix: Address Mypy issue which is causing CI to fail (#25494)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 9d1ab460c3 fix: Address Mypy issue which is causing CI to fail (#25494)
9d1ab460c3 is described below

commit 9d1ab460c371b89648568addbea15d3084a1f123
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Mon Oct 2 14:32:21 2023 -0700

    fix: Address Mypy issue which is causing CI to fail (#25494)
    
    (cherry picked from commit 36ed617090b72ad3cb7b587daa05f9d0dd984e7b)
---
 tests/unit_tests/db_engine_specs/test_clickhouse.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/unit_tests/db_engine_specs/test_clickhouse.py b/tests/unit_tests/db_engine_specs/test_clickhouse.py
index 6dfeddaf37..3f28341f26 100644
--- a/tests/unit_tests/db_engine_specs/test_clickhouse.py
+++ b/tests/unit_tests/db_engine_specs/test_clickhouse.py
@@ -30,6 +30,8 @@ from sqlalchemy.types import (
     String,
     TypeEngine,
 )
+from urllib3.connection import HTTPConnection
+from urllib3.exceptions import NewConnectionError
 
 from superset.utils.core import GenericDataType
 from tests.unit_tests.db_engine_specs.utils import (
@@ -56,14 +58,12 @@ def test_convert_dttm(
 
 
 def test_execute_connection_error() -> None:
-    from urllib3.exceptions import NewConnectionError
-
     from superset.db_engine_specs.clickhouse import ClickHouseEngineSpec
     from superset.db_engine_specs.exceptions import SupersetDBAPIDatabaseError
 
     cursor = Mock()
     cursor.execute.side_effect = NewConnectionError(
-        "Dummypool", "Exception with sensitive data"
+        HTTPConnection("localhost"), "Exception with sensitive data"
     )
     with pytest.raises(SupersetDBAPIDatabaseError) as ex:
         ClickHouseEngineSpec.execute(cursor, "SELECT col1 from table1")