Compare commits

..

No commits in common. "e8f702191fb4ddf99149f1d2c974b816151fecb2" and "c7d5694cd3aaca7790518b0f084053e1b87ba97c" have entirely different histories.

View file

@ -68,14 +68,10 @@ class TestDetectDestructivePatterns(unittest.TestCase):
results = [self._make_result("DROP TABLE users;")] results = [self._make_result("DROP TABLE users;")]
self.assertGreater(len(_detect_destructive_operations(results)), 0) self.assertGreater(len(_detect_destructive_operations(results)), 0)
# (6) DELETE FROM без WHERE — детектируется; с WHERE — нет (KIN-SEC-001) # (6) DELETE FROM detected
def test_delete_from_no_where_detected(self): def test_delete_from_detected(self):
results = [self._make_result("DELETE FROM sessions;")]
self.assertGreater(len(_detect_destructive_operations(results)), 0)
def test_delete_from_with_where_not_detected(self):
results = [self._make_result("DELETE FROM sessions WHERE expired = 1;")] results = [self._make_result("DELETE FROM sessions WHERE expired = 1;")]
self.assertEqual(len(_detect_destructive_operations(results)), 0) self.assertGreater(len(_detect_destructive_operations(results)), 0)
# (7) unlink detected # (7) unlink detected
def test_unlink_detected(self): def test_unlink_detected(self):