File tree Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,6 @@ class PackageSerializer(serializers.HyperlinkedModelSerializer):
124124 Lookup software package using Package URLs
125125 """
126126
127- def to_representation (self , instance ):
128- data = super ().to_representation (instance )
129- data ["unresolved_vulnerabilities" ] = data ["affected_by_vulnerabilities" ]
130- return data
131-
132127 purl = serializers .CharField (source = "package_url" )
133128
134129 affected_by_vulnerabilities = serializers .SerializerMethodField ("get_affected_vulnerabilities" )
Original file line number Diff line number Diff line change @@ -362,16 +362,6 @@ def test_api_with_single_vulnerability_and_fixed_package(self):
362362 "aliases" : ["CVE-2029-1234" ],
363363 },
364364 ],
365- "unresolved_vulnerabilities" : [
366- {
367- "url" : f"http://testserver/api/vulnerabilities/{ self .vuln1 .id } " ,
368- "vulnerability_id" : self .vuln1 .vulnerability_id ,
369- "summary" : "test-vuln1" ,
370- "references" : [],
371- "fixed_packages" : [],
372- "aliases" : ["CVE-2019-1234" , "GMS-1234-4321" ],
373- }
374- ],
375365 }
376366
377367 def test_api_with_single_vulnerability_and_vulnerable_package (self ):
@@ -402,22 +392,6 @@ def test_api_with_single_vulnerability_and_vulnerable_package(self):
402392 }
403393 ],
404394 "fixing_vulnerabilities" : [],
405- "unresolved_vulnerabilities" : [
406- {
407- "url" : f"http://testserver/api/vulnerabilities/{ self .vuln .id } " ,
408- "vulnerability_id" : self .vuln .vulnerability_id ,
409- "summary" : "test-vuln" ,
410- "references" : [],
411- "fixed_packages" : [
412- {
413- "url" : f"http://testserver/api/packages/{ self .package .id } " ,
414- "purl" : "pkg:generic/nginx/test@11" ,
415- "is_vulnerable" : True ,
416- }
417- ],
418- "aliases" : ["CVE-2029-1234" ],
419- }
420- ],
421395 }
422396
423397 def test_api_with_all_vulnerable_packages (self ):
You can’t perform that action at this time.
0 commit comments