Skip to content

Commit

Permalink
fix old driver tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mkeller committed Nov 7, 2024
1 parent 610a6e5 commit 140d185
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/integ/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@

import snowflake.connector
from snowflake.connector.compat import IS_WINDOWS
from snowflake.connector.config_manager import CONFIG_MANAGER
from snowflake.connector.connection import DefaultConverterClass

from .. import running_on_public_ci

try:
from snowflake.connector.config_manager import CONFIG_MANAGER
except ImportError:
CONFIG_MANAGER = None

try:
from ..parameters import CONNECTION_PARAMETERS
except ImportError:
Expand Down Expand Up @@ -123,7 +127,10 @@ def get_db_parameters(connection_name: str = "default") -> dict[str, Any]:
if connection_name == "default"
else connection_name
)
if cm_connection_name in CONFIG_MANAGER["connections"]:
if (
CONFIG_MANAGER is not None
and cm_connection_name in CONFIG_MANAGER["connections"]
):
# If config_manager knows of this connection then use it
ret = CONFIG_MANAGER["connections"][cm_connection_name].value.value
else:
Expand Down

0 comments on commit 140d185

Please sign in to comment.