Răsfoiți Sursa

Add a flake8 extension to tests to detect commented out code.

Dan Helfman 3 zile în urmă
părinte
comite
3eed3191e8
2 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 0
      test_requirements.txt
  2. 0 1
      tests/unit/hooks/data_source/test_mongodb.py

+ 1 - 0
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

+ 0 - 1
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