-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Keshav Priyadarshi <[email protected]>
- Loading branch information
1 parent
c271768
commit 9b63e21
Showing
5 changed files
with
25 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -566,8 +566,10 @@ class Project(UUIDPKModel, ExtraDataFieldMixin, UpdateMixin, models.Model): | |
max_length=2048, | ||
blank=True, | ||
help_text=_( | ||
"Package URL for the project, used for pushing project scan result to " | ||
"FederatedCode. This should be the PURL of the input." | ||
"Package URL (PURL) for the project, required for pushing the project's " | ||
"scan result to FederatedCode. For example, if the input is an input URL " | ||
"like https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz, the " | ||
"corresponding PURL would be pkg:npm/[email protected]." | ||
), | ||
) | ||
|
||
|
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 |
---|---|---|
|
@@ -230,6 +230,24 @@ def test_scanpipe_forms_project_settings_form_policies(self): | |
self.assertEqual(policies_as_yaml.strip(), project.settings["policies"]) | ||
self.assertEqual(license_policies_index, project.get_policy_index()) | ||
|
||
def test_scanpipe_forms_project_settings_form_purl(self): | ||
data_invalid_purl = { | ||
"name": "proj name", | ||
"purl": "pkg/npm/[email protected]", | ||
} | ||
data_valid_purl = { | ||
"name": "proj name", | ||
"purl": "pkg:npm/[email protected]", | ||
} | ||
|
||
form1 = ProjectSettingsForm(data=data_invalid_purl) | ||
self.assertFalse(form1.is_valid()) | ||
|
||
form2 = ProjectSettingsForm(data=data_valid_purl) | ||
self.assertTrue(form2.is_valid()) | ||
obj = form2.save() | ||
self.assertEqual("pkg:npm/[email protected]", obj.purl) | ||
|
||
def test_scanpipe_forms_edit_input_source_tag_form(self): | ||
data = {} | ||
form = EditInputSourceTagForm(data=data) | ||
|