File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
tests/unit_tests/db_engine_specs Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3030 String ,
3131 TypeEngine ,
3232)
33+ from urllib3 .connection import HTTPConnection
34+ from urllib3 .exceptions import NewConnectionError
3335
3436from superset .utils .core import GenericDataType
3537from tests .unit_tests .db_engine_specs .utils import (
@@ -56,14 +58,12 @@ def test_convert_dttm(
5658
5759
5860def 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" )
You can’t perform that action at this time.
0 commit comments