Improved unit test coverage of new analyzers; Utilize localized summaries; Require 100% code coverage on analyzers

This commit is contained in:
Jason Ertel
2022-05-12 16:32:47 -04:00
parent 6c506bbab0
commit b45b6b198b
14 changed files with 36 additions and 29 deletions

View File

@@ -86,7 +86,7 @@ class TestLocalfileMethods(unittest.TestCase):
]
results = localfile.prepareResults(raw)
self.assertEqual(results["response"], raw)
self.assertEqual(results["summary"], "One or more matches found.")
self.assertEqual(results["summary"], "suspicious")
self.assertEqual(results["status"], "info")
def test_prepareResults_error(self):
@@ -115,5 +115,5 @@ class TestLocalfileMethods(unittest.TestCase):
conf = {"file_path": "/home/intel.csv"}
with patch('localfile.localfile.searchFile', new=MagicMock(return_value=output)) as mock:
results = localfile.analyze(conf, artifactInput)
self.assertEqual(results["summary"], "One or more matches found.")
self.assertEqual(results["summary"], "suspicious")
mock.assert_called_once()