Skip to content

Commit

Permalink
removing test
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuczer committed Apr 3, 2023
1 parent fbe9a38 commit d2e5bea
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions tests/functional/test_baseline.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,34 +340,3 @@ def test_new_candidates_include_nosec_new_nosecs(self):
self.assertIn(candidate_example_five, return_value)
# candidate #6
self.assertIn(candidate_example_six, return_value)


def test_new_candidates_found(self):
baseline_report_files = {
"new_candidates-all.py": "new_candidates-all.py"
}
target_directory, baseline_code = self._create_baseline(
baseline_report_files
)
# assert the initial baseline found results
self.assertEqual(1, baseline_code)
baseline_report = os.path.join(
target_directory, self.baseline_report_file
)
# modify the baseline file to add new candidates
with open(os.path.join(target_directory, "new_candidates-all.py"), "a") as f:
f.write("subprocess.check_output(['ls'])\n")
return_value, return_code = self._run_bandit_baseline(
target_directory, baseline_report
)
# assert there were new results (new candidates found)
new_candidates_all_total_lines = "new_candidates_all_total_lines"
new_candidates_skip_nosec_lines = "new_candidates_skip_nosec_lines"
baseline_no_issues_found = "baseline_no_issues_found"
baseline_no_skipped_files = "baseline_no_skipped_files"
self.assertEqual(1, return_code)
self.assertIn(new_candidates_all_total_lines, return_value)
self.assertIn(new_candidates_skip_nosec_lines, return_value)
self.assertIn("subprocess.check_output(['ls'])", return_value)
self.assertNotIn(baseline_no_issues_found, return_value)
self.assertNotIn(baseline_no_skipped_files, return_value)

0 comments on commit d2e5bea

Please sign in to comment.