Skip to content

Commit 36ed617

Browse files
authored
fix: Address Mypy issue which is causing CI to fail (apache#25494)
1 parent 0d0a81c commit 36ed617

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/unit_tests/db_engine_specs/test_clickhouse.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
String,
3131
TypeEngine,
3232
)
33+
from urllib3.connection import HTTPConnection
34+
from urllib3.exceptions import NewConnectionError
3335

3436
from superset.utils.core import GenericDataType
3537
from tests.unit_tests.db_engine_specs.utils import (
@@ -56,14 +58,12 @@ def test_convert_dttm(
5658

5759

5860
def test_execute_connection_error() -> None:
59-
from urllib3.exceptions import NewConnectionError
60-
6161
from superset.db_engine_specs.clickhouse import ClickHouseEngineSpec
6262
from superset.db_engine_specs.exceptions import SupersetDBAPIDatabaseError
6363

6464
cursor = Mock()
6565
cursor.execute.side_effect = NewConnectionError(
66-
"Dummypool", "Exception with sensitive data"
66+
HTTPConnection("localhost"), "Exception with sensitive data"
6767
)
6868
with pytest.raises(SupersetDBAPIDatabaseError) as ex:
6969
ClickHouseEngineSpec.execute(cursor, "SELECT col1 from table1")

0 commit comments

Comments
 (0)