Add test for when indicator is not found

This commit is contained in:
Wes Lambert
2022-05-12 19:02:41 +00:00
parent a233c08830
commit 3dc266cfa9

View File

@@ -104,6 +104,13 @@ class TestVirusTotalMethods(unittest.TestCase):
self.assertEqual(results["summary"], "harmless") self.assertEqual(results["summary"], "harmless")
self.assertEqual(results["status"], "ok") self.assertEqual(results["status"], "ok")
def test_prepareResults_indicator_not_Found(self):
raw = {"error": "Indicator not found."}
results = pulsedive.prepareResults(raw)
self.assertEqual(results["response"], raw)
self.assertEqual(results["summary"], "no_results")
self.assertEqual(results["status"], "ok")
def test_prepareResults_error(self): def test_prepareResults_error(self):
raw = {} raw = {}
results = pulsedive.prepareResults(raw) results = pulsedive.prepareResults(raw)