File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
tests/pipelines/v2_improvers Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,11 @@ def collect_and_store_fix_commits(self):
4545 for adv in progress .iter (affected_advisories .paginated (per_page = 500 )):
4646 for reference in adv .references .all ():
4747 purl = url2purl (reference .url )
48- if not purl or (purl .type not in VCS_URLS_SUPPORTED_TYPES ) or not is_commit (purl .version ):
48+ if (
49+ not purl
50+ or (purl .type not in VCS_URLS_SUPPORTED_TYPES )
51+ or not is_commit (purl .version )
52+ ):
4953 continue
5054
5155 base_purl = get_core_purl (purl )
Original file line number Diff line number Diff line change 77# See https://aboutcode.org for more information about nexB OSS projects.
88
99from datetime import datetime
10+
1011import pytest
12+
1113from vulnerabilities .models import AdvisoryReference
1214from vulnerabilities .models import AdvisoryV2
1315from vulnerabilities .models import ImpactedPackage
@@ -92,7 +94,9 @@ def test_collect_fix_commits_pipeline_skips_non_commit_urls():
9294 impact = ImpactedPackage .objects .create (advisory = advisory )
9395 impact .affecting_packages .add (package )
9496
95- reference = AdvisoryReference .objects .create (url = "https://github.com/test/testpkg/issues/12" ) # invalid reference 1
97+ reference = AdvisoryReference .objects .create (
98+ url = "https://github.com/test/testpkg/issues/12"
99+ ) # invalid reference 1
96100 advisory .references .add (reference )
97101
98102 pipeline = CollectReferencesFixCommitsPipeline ()
You can’t perform that action at this time.
0 commit comments