kin: KIN-SEC-002 Починить 4 падающих теста: falsy output preservation

This commit is contained in:
Gros Frumos 2026-03-17 22:28:28 +02:00
parent c201152df5
commit 497eeea6b8
2 changed files with 11 additions and 6 deletions

View file

@ -3018,9 +3018,14 @@ class TestDetectDestructiveOperations:
assert len(_detect_destructive_operations(results)) > 0
def test_detects_delete_from_with_where(self):
"""DELETE FROM WHERE → тоже детектируется (по дизайну runner'а)."""
"""DELETE FROM с WHERE — НЕ деструктивная операция, не детектируется."""
results = [self._result("DELETE FROM sessions WHERE expired=1")]
assert len(_detect_destructive_operations(results)) > 0
assert _detect_destructive_operations(results) == []
def test_detects_delete_from_with_where_complex(self):
"""DELETE FROM с WHERE и сложным условием — тоже не детектируется."""
results = [self._result("DELETE FROM logs WHERE created_at < '2024-01-01' AND user_id = 42")]
assert _detect_destructive_operations(results) == []
def test_detects_unlink_shell(self):
"""unlink /path → детектируется."""