From 3eed3191e8f80f9e39025ae5c78662e65fef80e0 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 30 Jun 2025 21:42:38 -0700 Subject: [PATCH] Add a flake8 extension to tests to detect commented out code. --- test_requirements.txt | 1 + tests/unit/hooks/data_source/test_mongodb.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/test_requirements.txt b/test_requirements.txt index efd1f828..514e2e08 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -10,6 +10,7 @@ codespell==2.4.1 coverage==7.9.1 flake8==7.3.0 flake8-bandit==4.1.1 +flake8-eradicate==1.5.0 flake8-quotes==3.4.0 flake8-use-fstring==1.4 flake8-variables-names==0.0.6 diff --git a/tests/unit/hooks/data_source/test_mongodb.py b/tests/unit/hooks/data_source/test_mongodb.py index 3cd0aff3..8f4c7f7b 100644 --- a/tests/unit/hooks/data_source/test_mongodb.py +++ b/tests/unit/hooks/data_source/test_mongodb.py @@ -809,7 +809,6 @@ def test_build_restore_command_prevents_shell_injection(): extract_process, database, config, dump_filename, connection_params ) - # print(command) # Ensure the malicious input is properly escaped and does not execute assert 'rm -rf /' not in command assert ';' not in command