Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vulnerabilities/tests/pipelines/test_pipeline_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_no_empty_pipeline_ids(self):
assert False, error_message

def test_no_none_pipeline_ids(self):
none_pipeline_ids = [cls for cls, pid in self.pipeline_dict.items() if pid == None]
none_pipeline_ids = [cls for cls, pid in self.pipeline_dict.items() if pid is None]

if none_pipeline_ids:
error_messages = [f"{cls.__name__} has None pipeline_id." for cls in none_pipeline_ids]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ def test_to_advisories_missing_fields(pipeline):

assert advisory.advisory_id == "XSA-None"
assert advisory.aliases == []
assert advisory.summary == None
assert advisory.summary is None
3 changes: 1 addition & 2 deletions vulnerabilities/tests/test_improve_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ def get_objects_in_all_tables_used_by_process_inferences():
"references": list(VulnerabilityReference.objects.all()),
"advisories": list(Advisory.objects.all()),
"packages": list(Package.objects.all()),
"references": list(VulnerabilityReference.objects.all()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change ?

Copy link
Author

@shbhmexe shbhmexe Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'references' key was duplicated in this dictionary (lines 182 and 185). I removed the second occurrence as it was redundant and overwriting the first one.

"severity": list(VulnerabilitySeverity.objects.all()),
}

Expand All @@ -207,7 +206,7 @@ def test_process_inference_idempotency_with_different_improver_names():

@pytest.mark.django_db
def test_get_or_created_vulnerability_and_aliases_with_empty_aliases():
assert get_or_create_vulnerability_and_aliases(aliases=[], summary="EMPTY ALIASES") == None
assert get_or_create_vulnerability_and_aliases(aliases=[], summary="EMPTY ALIASES") is None


@pytest.mark.django_db
Expand Down