mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Fix unit test issues
This commit is contained in:
@@ -35,7 +35,9 @@ class TestMalwareHashRegistryMethods(unittest.TestCase):
|
||||
response = malwarehashregistry.sendReq(hash)
|
||||
mock.assert_called_once_with(options, hash, flags)
|
||||
self.assertIsNotNone(response)
|
||||
self.assertEqual(response, {"hash": "84af04b8e69682782607a0c5796ca56999eda6b3", "last_seen": "2019-15-07 03:30:33", "av_detection_percentage": 35})
|
||||
self.assertEqual(response["hash"], "84af04b8e69682782607a0c5796ca56999eda6b3")
|
||||
self.assertRegex(response["last_seen"], r'2019-..-07 ..:..:33') # host running this test won't always use UTC
|
||||
self.assertEqual(response["av_detection_percentage"], 35)
|
||||
|
||||
def test_sendReqNoData(self):
|
||||
output = "84af04b8e69682782607a0c5796ca5696b3 NO_DATA"
|
||||
|
||||
Reference in New Issue
Block a user