File tree Expand file tree Collapse file tree 3 files changed +307750
-4
lines changed Expand file tree Collapse file tree 3 files changed +307750
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def fetch(self) -> Iterable[Mapping]:
3636
3737 def advisory_data (self ) -> Iterable [AdvisoryData ]:
3838 for record in self .fetch ():
39- yield self .parse_advisory (record )
39+ yield from self .parse_advisory (record )
4040
4141 def parse_advisory (self , record ) -> List [AdvisoryData ]:
4242 advisories = []
Original file line number Diff line number Diff line change @@ -43,13 +43,11 @@ def test_parse_advisory_single():
4343 util_tests .check_results_against_json (result , expected_file )
4444
4545
46- @patch ("vulnerabilities.importers.archlinux.ArchlinuxImporter.fetch " )
46+ @patch ("vulnerabilities.utils.fetch_response " )
4747def test_archlinux_importer (mock_response ):
4848 with open (os .path .join (TEST_DATA , "archlinux-multi.json" )) as f :
4949 mock_response .return_value = json .load (f )
5050
5151 expected_file = os .path .join (TEST_DATA , f"archlinux-multi-expected.json" )
5252 result = [data .to_dict () for data in list (archlinux .ArchlinuxImporter ().advisory_data ())]
53- # result = [data.to_dict() for data in archlinux.ArchlinuxImporter().advisory_data()]
54- # result = archlinux.ArchlinuxImporter().advisory_data()
5553 util_tests .check_results_against_json (result , expected_file )
You can’t perform that action at this time.
0 commit comments