diff --git a/tests/nvd/cpe_match/test_api.py b/tests/nvd/cpe_match/test_api.py index 7ca77e33f..c5d9a39b7 100644 --- a/tests/nvd/cpe_match/test_api.py +++ b/tests/nvd/cpe_match/test_api.py @@ -341,54 +341,6 @@ async def test_cpe_matches_match_string_search(self): with self.assertRaises(StopAsyncIteration): cpe_match = await anext(it) - async def test_cpe_matches_match_string_search(self): - match_criteria_id = uuid4() - cpe_name_id = uuid4() - - self.http_client.get.side_effect = create_cpe_match_responses( - match_criteria_id, cpe_name_id - ) - - it = aiter( - self.api.cpe_matches( - match_string_search="cpe:2.3:a:sun:jre:*:*:*:*:*:*:*:*" - ) - ) - cpe_match = await anext(it) - - self.assertEqual( - uuid_replace(match_criteria_id, 1, 1), cpe_match.match_criteria_id - ) - self.http_client.get.assert_awaited_once_with( - "https://services.nvd.nist.gov/rest/json/cpematch/2.0", - headers={}, - params={ - "startIndex": 0, - "matchStringSearch": "cpe:2.3:a:sun:jre:*:*:*:*:*:*:*:*", - "resultsPerPage": MAX_CPE_MATCHES_PER_PAGE, - }, - ) - - self.http_client.get.reset_mock() - - cpe_match = await anext(it) - - self.assertEqual( - uuid_replace(match_criteria_id, 2, 1), cpe_match.match_criteria_id - ) - self.http_client.get.assert_awaited_once_with( - "https://services.nvd.nist.gov/rest/json/cpematch/2.0", - headers={}, - params={ - "startIndex": 1, - "matchStringSearch": "cpe:2.3:a:sun:jre:*:*:*:*:*:*:*:*", - "resultsPerPage": 1, - }, - ) - - with self.assertRaises(StopAsyncIteration): - cpe_match = await anext(it) - async def test_cpe_matches_request_results(self): match_criteria_id = uuid4() cpe_name_id = uuid4() diff --git a/tests/nvd/models/test_cpe_match.py b/tests/nvd/models/test_cpe_match.py index e1576ee76..c583a524a 100644 --- a/tests/nvd/models/test_cpe_match.py +++ b/tests/nvd/models/test_cpe_match.py @@ -9,7 +9,7 @@ from datetime import datetime, timezone from uuid import UUID -from pontos.nvd.models.cpe_match_string import CPEMatchString, CPEMatch +from pontos.nvd.models.cpe_match_string import CPEMatch, CPEMatchString from tests.nvd import get_cpe_match_data