Skip to content

Commit 7abc825

Browse files
committed
Fix tests
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent adbe227 commit 7abc825

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

vulnerabilities/tests/pipelines/v2_improvers/test_compute_advisory_todo_v2.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,13 @@ def test_todo_conflict_details_partial_curation(self):
293293
"package": {
294294
"type": "npm",
295295
"namespace": "",
296-
"name": "package1",
296+
"name": "package2",
297297
"version": "",
298298
"qualifiers": "",
299299
"subpath": "",
300300
},
301301
"affected_version_range": "vers:npm/>=1.0.0|<=2.0.0",
302-
"fixed_version_range": "vers:npm/2.0.1",
302+
"fixed_version_range": None,
303303
"introduced_by_commit_patches": [],
304304
"fixed_by_commit_patches": [],
305305
},
@@ -312,36 +312,36 @@ def test_todo_conflict_details_partial_curation(self):
312312
"qualifiers": "",
313313
"subpath": "",
314314
},
315-
"affected_version_range": "vers:npm/>=1.0.0|<=2.0.0",
315+
"affected_version_range": "vers:npm/>=3.0.0|<=3.9.0",
316316
"fixed_version_range": None,
317317
"introduced_by_commit_patches": [],
318318
"fixed_by_commit_patches": [],
319319
},
320320
{
321321
"package": {
322-
"type": "npm",
322+
"type": "pypi",
323323
"namespace": "",
324-
"name": "package2",
324+
"name": "package1",
325325
"version": "",
326326
"qualifiers": "",
327327
"subpath": "",
328328
},
329-
"affected_version_range": "vers:npm/>=3.0.0|<=3.9.0",
330-
"fixed_version_range": None,
329+
"affected_version_range": "vers:pypi/>=1.0.0|<=2.0.0",
330+
"fixed_version_range": "vers:pypi/2.0.1",
331331
"introduced_by_commit_patches": [],
332332
"fixed_by_commit_patches": [],
333333
},
334334
{
335335
"package": {
336-
"type": "pypi",
336+
"type": "npm",
337337
"namespace": "",
338338
"name": "package1",
339339
"version": "",
340340
"qualifiers": "",
341341
"subpath": "",
342342
},
343-
"affected_version_range": "vers:pypi/>=1.0.0|<=2.0.0",
344-
"fixed_version_range": "vers:pypi/2.0.1",
343+
"affected_version_range": "vers:npm/>=1.0.0|<=2.0.0",
344+
"fixed_version_range": "vers:npm/2.0.1",
345345
"introduced_by_commit_patches": [],
346346
"fixed_by_commit_patches": [],
347347
},
@@ -381,6 +381,7 @@ def test_todo_conflict_details_partial_curation(self):
381381
result_partial_curation = issue_details["partial_curation_advisory"]
382382
self.assertEqual(1, AdvisoryToDoV2.objects.count())
383383
self.assertEqual("CONFLICTING_FIXED_BY_PACKAGES", todo.issue_type)
384+
print(result_partial_curation)
384385
self.assertDictEqual(expected_partial_curation_advisory, result_partial_curation)
385386

386387
def test_todo_conflict_details_partial_curation_unpaired_purl_and_conflicting_affected_and_fixed(

0 commit comments

Comments
 (0)