Skip to content

Commit

Permalink
Add support for new fields in "add component from package" #63
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Jun 27, 2024
1 parent 178a12b commit fe92253
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions component_catalog/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,8 @@ def test_package_list_view_add_to_component_from_package_data(self):
name="common_name",
version="",
homepage_url="https://p2.com",
declared_license_expression="mit",
other_license_expression="mpl",
dataspace=self.dataspace,
)
component_add_url = reverse("component_catalog:component_add")
Expand All @@ -1517,6 +1519,8 @@ def test_package_list_view_add_to_component_from_package_data(self):
'class="urlinput form-control" aria-describedby="id_homepage_url_helptext" '
'id="id_homepage_url">',
)
self.assertContains(response, "mit")
self.assertContains(response, "mpl")

def test_package_list_view_usage_policy_availability(self):
self.client.login(username=self.super_user.username, password="secret")
Expand Down
2 changes: 2 additions & 0 deletions component_catalog/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,8 @@ def get_form_kwargs(self):
"primary_language",
"cpe",
"license_expression",
"declared_license_expression",
"other_license_expression",
"keywords",
"usage_policy",
"copyright",
Expand Down

0 comments on commit fe92253

Please sign in to comment.