-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 474301d.
- Loading branch information
Showing
97 changed files
with
1,457 additions
and
5,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
vulnerabilities/migrations/0058_vulnerabilityreference_reference_type.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ | |
|
||
from vulnerabilities.api import MinimalPackageSerializer | ||
from vulnerabilities.api import PackageSerializer | ||
from vulnerabilities.api import VulnerabilityReferenceSerializer | ||
from vulnerabilities.models import Alias | ||
from vulnerabilities.models import ApiUser | ||
from vulnerabilities.models import Package | ||
|
@@ -162,9 +161,6 @@ def setUp(self): | |
namespace="ubuntu", | ||
qualifiers={"distro": "jessie"}, | ||
) | ||
self.ref = VulnerabilityReference.objects.create( | ||
reference_type="advisory", reference_id="CVE-xxx-xxx", url="https://example.com" | ||
) | ||
self.user = ApiUser.objects.create_api_user(username="[email protected]") | ||
self.auth = f"Token {self.user.auth_token.key}" | ||
self.client = APIClient(enforce_csrf_checks=True) | ||
|
@@ -185,16 +181,6 @@ def test_package_serializer(self): | |
purls = {r["purl"] for r in response} | ||
self.assertIn("pkg:deb/ubuntu/[email protected]?distro=jessie", purls) | ||
|
||
def test_vulnerability_reference_serializer(self): | ||
response = VulnerabilityReferenceSerializer(instance=self.ref).data | ||
assert response == { | ||
"reference_url": "https://example.com", | ||
"reference_id": "CVE-xxx-xxx", | ||
"reference_type": "advisory", | ||
"scores": [], | ||
"url": "https://example.com", | ||
} | ||
|
||
|
||
class APITestCaseVulnerability(TransactionTestCase): | ||
def setUp(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.