-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow querying by PURLs that have version numbers. (#303)
Part of #64.
- Loading branch information
1 parent
1ecd32c
commit e173807
Showing
3 changed files
with
38 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -435,6 +435,15 @@ def test_query_purl(self): | |
self.assert_results_equal({'vulns': [self._VULN_RUSTSEC_2020_0105]}, | ||
response.json()) | ||
|
||
response = requests.post( | ||
_api() + '/v1/query', | ||
data=json.dumps({'package': { | ||
'purl': 'pkg:cargo/[email protected]', | ||
}})) | ||
|
||
self.assert_results_equal({'vulns': [self._VULN_RUSTSEC_2020_0105]}, | ||
response.json()) | ||
|
||
|
||
def print_logs(filename): | ||
"""Print logs.""" | ||
|
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