Skip to content

Commit

Permalink
Add new field in API serializer #569
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Druez <[email protected]>
  • Loading branch information
tdruez committed May 5, 2023
1 parent 1756c3a commit b887491
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions scanpipe/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,13 @@ class Meta:
"sha256",
"sha512",
"copyright",
"holder",
"declared_license_expression",
"declared_license_expression_spdx",
"license_detections",
"other_license_expression",
"other_license_expression_spdx",
"other_license_detections",
"extracted_license_statement",
"notice_text",
"source_packages",
Expand Down
2 changes: 1 addition & 1 deletion scanpipe/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def test_scanpipe_api_serializer_get_model_serializer(self):
get_model_serializer(None)

def test_scanpipe_api_serializer_get_serializer_fields(self):
self.assertEqual(38, len(get_serializer_fields(DiscoveredPackage)))
self.assertEqual(44, len(get_serializer_fields(DiscoveredPackage)))
self.assertEqual(11, len(get_serializer_fields(DiscoveredDependency)))
self.assertEqual(30, len(get_serializer_fields(CodebaseResource)))
self.assertEqual(3, len(get_serializer_fields(CodebaseRelation)))
Expand Down

0 comments on commit b887491

Please sign in to comment.