Skip to content

Commit 84b35a7

Browse files
committed
fix: ignore hardcoded mock passwords in tests
1 parent 6c4aaf5 commit 84b35a7

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

ibis/backends/databricks/tests/test_memtable_unit.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_allow_memtable_in_memory_initializes_polars_backend():
2323
con = ibis.databricks.connect(
2424
server_hostname="test.databricks.com",
2525
http_path="/sql/1.0/warehouses/test",
26-
access_token="test_token",
26+
access_token="test_token", # noqa: S106
2727
allow_memtable_in_memory=True,
2828
)
2929

@@ -45,16 +45,14 @@ def test_default_memtable_behavior_without_flag():
4545
with (
4646
patch("databricks.sql.connect") as mock_db_connect,
4747
patch.object(ibis.backends.databricks.Backend, "current_catalog", "test_cat"),
48-
patch.object(
49-
ibis.backends.databricks.Backend, "current_database", "test_db"
50-
),
48+
patch.object(ibis.backends.databricks.Backend, "current_database", "test_db"),
5149
):
5250
mock_db_connect.return_value = MagicMock()
5351

5452
con = ibis.databricks.connect(
5553
server_hostname="test.databricks.com",
5654
http_path="/sql/1.0/warehouses/test",
57-
access_token="test_token",
55+
access_token="test_token", # noqa: S106
5856
)
5957

6058
# Verify in-memory flag is False
@@ -87,7 +85,7 @@ def mock_import(name, *args, **kwargs):
8785
ibis.databricks.connect(
8886
server_hostname="test.databricks.com",
8987
http_path="/sql/1.0/warehouses/test",
90-
access_token="test_token",
88+
access_token="test_token", # noqa: S106
9189
allow_memtable_in_memory=True,
9290
)
9391

@@ -105,7 +103,7 @@ def test_register_in_memory_table_delegates_to_polars():
105103
con = ibis.databricks.connect(
106104
server_hostname="test.databricks.com",
107105
http_path="/sql/1.0/warehouses/test",
108-
access_token="test_token",
106+
access_token="test_token", # noqa: S106
109107
allow_memtable_in_memory=True,
110108
)
111109

@@ -133,7 +131,7 @@ def test_memtable_finalizer_uses_polars_when_in_memory():
133131
con = ibis.databricks.connect(
134132
server_hostname="test.databricks.com",
135133
http_path="/sql/1.0/warehouses/test",
136-
access_token="test_token",
134+
access_token="test_token", # noqa: S106
137135
allow_memtable_in_memory=True,
138136
)
139137

@@ -154,16 +152,14 @@ def test_explicit_memtable_volume_overrides_in_memory_flag():
154152
with (
155153
patch("databricks.sql.connect") as mock_db_connect,
156154
patch.object(ibis.backends.databricks.Backend, "current_catalog", "test_cat"),
157-
patch.object(
158-
ibis.backends.databricks.Backend, "current_database", "test_db"
159-
),
155+
patch.object(ibis.backends.databricks.Backend, "current_database", "test_db"),
160156
):
161157
mock_db_connect.return_value = MagicMock()
162158

163159
con = ibis.databricks.connect(
164160
server_hostname="test.databricks.com",
165161
http_path="/sql/1.0/warehouses/test",
166-
access_token="test_token",
162+
access_token="test_token", # noqa: S106
167163
memtable_volume="my_custom_volume",
168164
allow_memtable_in_memory=True, # This should be ignored
169165
)

0 commit comments

Comments
 (0)