Skip to content

Commit d4023b1

Browse files
removed unnecessary tests in databricks and snowflake
1 parent 42130a6 commit d4023b1

2 files changed

Lines changed: 0 additions & 40 deletions

File tree

tests/adapters/test_databricks_adapter.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -224,27 +224,6 @@ def test_rejects_non_databricks_configs(self):
224224
for invalid in invalid_configs:
225225
assert can_handle_databricks(invalid) is False
226226

227-
def test_type_field_not_strictly_enforced(self):
228-
"""Test that Pydantic validates structure but doesn't enforce type value.
229-
230-
Note: DatabricksConfig validates that 'identifier' field exists,
231-
but doesn't strictly validate the 'type' field value.
232-
This means a config with wrong type but valid structure passes validation.
233-
234-
This could be a potential bug - consider adding field validation.
235-
"""
236-
# This passes validation because it has the required 'identifier' field
237-
config_with_wrong_type = {"identifier": "table", "type": "snowflake"}
238-
239-
# Pydantic validates successfully (structure is correct)
240-
result = DatabricksAdapter.check_data(config_with_wrong_type)
241-
242-
# But the type field is NOT corrected - it keeps the wrong value!
243-
# This is a potential bug in the validation logic
244-
assert result.type == "snowflake" # Wrong type passes through!
245-
assert result.identifier == "table"
246-
247-
248227
# ============================================================================
249228
# Error Handling Tests
250229
# ============================================================================

tests/adapters/test_snowflake_adapter.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -211,25 +211,6 @@ def test_rejects_non_snowflake_configs(self):
211211
for invalid in invalid_configs:
212212
assert can_handle_snowflake(invalid) is False
213213

214-
def test_type_field_not_strictly_enforced(self):
215-
"""Test that Pydantic validates structure but doesn't enforce type value.
216-
217-
Note: SnowflakeConfig validates that 'identifier' field exists,
218-
but doesn't strictly validate the 'type' field value.
219-
This means a config with wrong type but valid structure passes validation.
220-
221-
This could be a potential bug - consider adding field validation.
222-
"""
223-
# This passes validation because it has the required 'identifier' field
224-
config_with_wrong_type = {"identifier": "table", "type": "databricks"}
225-
226-
# Pydantic validates successfully (structure is correct)
227-
result = SnowflakeAdapter.check_data(config_with_wrong_type)
228-
229-
# But the type field is NOT corrected - it keeps the wrong value!
230-
# This is a potential bug in the validation logic
231-
assert result.type == "databricks" # Wrong type passes through!
232-
assert result.identifier == "table"
233214

234215

235216
# ============================================================================

0 commit comments

Comments
 (0)