mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-09 02:32:46 +01:00
Improved unit test coverage of new analyzers; Utilize localized summaries; Require 100% code coverage on analyzers
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user