Skip to content

Commit a10cb00

Browse files
committed
FEAT: Access Token Login
1 parent a7282d9 commit a10cb00

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mssql_python/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, connection_str: str = "", autocommit: bool = False, attrs_bef
6363
self._initializer()
6464
self.setautocommit(autocommit)
6565

66-
def _construct_connection_string(self, connection_str: str, **kwargs) -> str:
66+
def _construct_connection_string(self, connection_str: str = "", **kwargs) -> str:
6767
"""
6868
Construct the connection string by concatenating the connection string
6969
with key/value pairs from kwargs.

tests/test_003_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_connection_string_with_attrs_before(db_connection):
5555
assert "TrustServerCertificate=yes;" in conn_str, "Connection string should contain 'TrustServerCertificate=yes;'"
5656
assert "APP=MSSQL-Python" in conn_str, "Connection string should contain 'APP=MSSQL-Python'"
5757
assert "Driver={ODBC Driver 18 for SQL Server}" in conn_str, "Connection string should contain 'Driver={ODBC Driver 18 for SQL Server}'"
58-
assert "{1256: token}" in conn_str, "Connection string should contain '{1256: token}'"
58+
assert "{1256: token}" not in conn_str, "Connection string should not contain '{1256: token}'"
5959

6060
def test_connection_string_with_odbc_param(db_connection):
6161
# Check if the connection string is constructed correctly with ODBC parameters

0 commit comments

Comments
 (0)