From 4e577866780e037e5adf6941d17c38fe25d59440 Mon Sep 17 00:00:00 2001 From: Justin Jeffery Date: Thu, 3 Mar 2022 13:57:37 -0500 Subject: [PATCH] fix: tests --- tests/unittests/tools/test_nist.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unittests/tools/test_nist.py b/tests/unittests/tools/test_nist.py index 2cb72d0..3dffd0f 100644 --- a/tests/unittests/tools/test_nist.py +++ b/tests/unittests/tools/test_nist.py @@ -69,11 +69,15 @@ def test_check_other(self, get): @patch("httpx.Client.get") def test_check_timeout(self, get): get().raise_for_status.side_effect = ReadTimeout("Timeout") - res = self.vuln.check_cve("riverbed", "steelhead", "6.5.2a") + res = self.vuln.check_cve("cisco", "steelhead", "6.5.2a") self.assertEqual(res.error, "Timeout") @patch("httpx.Client.get") def test_check_error(self, get): get().raise_for_status.side_effect = HTTPStatusError("Timeout", request=MagicMock(), response=MagicMock()) - res = self.vuln.check_cve("riverbed", "steelhead", "6.5.2a") + res = self.vuln.check_cve("cisco", "steelhead", "6.5.2a") self.assertEqual(res.error, "HTTP Error") + + def test_check_unsupported(self): + res = self.vuln.check_cve("riverbed", "steelhead", "6.5.2a") + self.assertEqual(res.error, "Unsupported")