Skip to content

Commit 88db988

Browse files
authored
fix: Make account name optional (#92)
1 parent 00c3122 commit 88db988

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/firebolt_db/firebolt_dialect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ def create_connect_args(self, url: URL) -> Tuple[List, Dict]:
153153
additional_parameters = {}
154154
if "account_name" in parameters:
155155
kwargs["account_name"] = parameters.pop("account_name")
156-
else:
156+
elif isinstance(auth, ClientCredentials):
157+
# account_name is required for client credentials authentication
157158
raise ArgumentError(
158159
"account_name parameter must be provided to authenticate"
159160
)

tests/unit/test_firebolt_dialect.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def test_create_dialect(self, dialect: FireboltDialect):
3636
def test_create_connect_args_user_password(self, dialect: FireboltDialect):
3737
u = url.make_url(
3838
"test_engine://[email protected]:test_password@test_db_name/test_engine_name"
39-
"?account_name=dummy"
4039
)
4140
with mock.patch.dict(os.environ, {"FIREBOLT_BASE_URL": "test_url"}):
4241
result_list, result_dict = dialect.create_connect_args(u)

0 commit comments

Comments
 (0)