@@ -140,7 +140,9 @@ def setUp(self):
140140 vuln1 = Vulnerability .objects .create (
141141 summary = "test-vuln1" ,
142142 )
143- alias = Alias .objects .create (alias = "CVE-2019-1234" , vulnerability = vuln1 )
143+ Alias .objects .create (alias = "CVE-2019-1234" , vulnerability = vuln1 )
144+ Alias .objects .create (alias = "GMS-1234-4321" , vulnerability = vuln1 )
145+ Alias .objects .create (alias = "CVE-2029-1234" , vulnerability = vuln )
144146 self .vuln1 = vuln1
145147 PackageRelatedVulnerability .objects .create (
146148 package = self .package ,
@@ -185,7 +187,7 @@ def test_api_with_single_vulnerability_and_fixed_package(self):
185187 "summary" : "test-vuln1" ,
186188 "references" : [],
187189 "fixed_packages" : [],
188- "aliases" : [{ "alias" : " CVE-2019-1234"} ],
190+ "aliases" : [" CVE-2019-1234", "GMS-1234-4321" ],
189191 }
190192 ],
191193 "fixing_vulnerabilities" : [
@@ -201,7 +203,7 @@ def test_api_with_single_vulnerability_and_fixed_package(self):
201203 "is_vulnerable" : True ,
202204 }
203205 ],
204- "aliases" : [],
206+ "aliases" : ["CVE-2029-1234" ],
205207 },
206208 ],
207209 "unresolved_vulnerabilities" : [
@@ -211,7 +213,7 @@ def test_api_with_single_vulnerability_and_fixed_package(self):
211213 "summary" : "test-vuln1" ,
212214 "references" : [],
213215 "fixed_packages" : [],
214- "aliases" : [{ "alias" : " CVE-2019-1234"} ],
216+ "aliases" : [" CVE-2019-1234", "GMS-1234-4321" ],
215217 }
216218 ],
217219 }
0 commit comments