@@ -114,7 +114,7 @@ def test_copyleft_policy_explicit(self):
114
114
copyleft = Copyleft (filepath = input_file_name , format_type = 'json' , explicit = 'MIT' )
115
115
status , results = copyleft .run ()
116
116
details = json .loads (results ['details' ])
117
- self .assertEqual (len (details ['components' ]), 3 )
117
+ self .assertEqual (len (details ['components' ]), 2 )
118
118
self .assertEqual (status , 0 )
119
119
120
120
"""
@@ -144,11 +144,10 @@ def test_copyleft_policy_markdown(self):
144
144
expected_detail_output = (
145
145
'### Copyleft licenses \n | Component | Version | License | URL | Copyleft |\n '
146
146
' | - | :-: | - | - | :-: |\n '
147
- '| pkg:github/scanoss/engine | 4.0.4 | MIT | https://spdx.org/licenses/MIT.html | YES | \n '
148
147
' | pkg:npm/%40electron/rebuild | 3.7.0 | MIT | https://spdx.org/licenses/MIT.html | YES |\n '
149
148
'| pkg:npm/%40emotion/react | 11.13.3 | MIT | https://spdx.org/licenses/MIT.html | YES | \n '
150
149
)
151
- expected_summary_output = '3 component(s) with copyleft licenses were found.\n '
150
+ expected_summary_output = '2 component(s) with copyleft licenses were found.\n '
152
151
self .assertEqual (
153
152
re .sub (r'\s|\\(?!`)|\\(?=`)' , '' , results ['details' ]),
154
153
re .sub (r'\s|\\(?!`)|\\(?=`)' , '' , expected_detail_output ),
@@ -214,9 +213,9 @@ def test_undeclared_policy_markdown(self):
214
213
expected_details_output = """ ### Undeclared components
215
214
| Component | Version | License |
216
215
| - | - | - |
217
- | pkg:github/scanoss/scanner.c | 1.3.3 | BSD-2-Clause - GPL-2.0-only |
216
+ | pkg:github/scanoss/scanner.c | 1.3.3 | GPL-2.0-only |
218
217
| pkg:github/scanoss/scanner.c | 1.1.4 | GPL-2.0-only |
219
- | pkg:github/scanoss/wfp | 6afc1f6 | Zlib - GPL-2.0-only | """
218
+ | pkg:github/scanoss/wfp | 6afc1f6 | GPL-2.0-only | """
220
219
221
220
expected_summary_output = """3 undeclared component(s) were found.
222
221
Add the following snippet into your `sbom.json` file
@@ -257,9 +256,9 @@ def test_undeclared_policy_markdown_scanoss_summary(self):
257
256
expected_details_output = """ ### Undeclared components
258
257
| Component | Version | License |
259
258
| - | - | - |
260
- | pkg:github/scanoss/scanner.c | 1.3.3 | BSD-2-Clause - GPL-2.0-only |
259
+ | pkg:github/scanoss/scanner.c | 1.3.3 | GPL-2.0-only |
261
260
| pkg:github/scanoss/scanner.c | 1.1.4 | GPL-2.0-only |
262
- | pkg:github/scanoss/wfp | 6afc1f6 | Zlib - GPL-2.0-only | """
261
+ | pkg:github/scanoss/wfp | 6afc1f6 | GPL-2.0-only | """
263
262
264
263
expected_summary_output = """3 undeclared component(s) were found.
265
264
Add the following snippet into your `scanoss.json` file
@@ -332,9 +331,9 @@ def test_undeclared_policy_jira_markdown_output(self):
332
331
details = results ['details' ]
333
332
summary = results ['summary' ]
334
333
expected_details_output = """|*Component*|*Version*|*License*|
335
- |pkg:github/scanoss/scanner.c|1.3.3|BSD-2-Clause - GPL-2.0-only|
334
+ |pkg:github/scanoss/scanner.c|1.3.3|GPL-2.0-only|
336
335
|pkg:github/scanoss/scanner.c|1.1.4|GPL-2.0-only|
337
- |pkg:github/scanoss/wfp|6afc1f6|Zlib - GPL-2.0-only|
336
+ |pkg:github/scanoss/wfp|6afc1f6|GPL-2.0-only|
338
337
"""
339
338
expected_summary_output = """3 undeclared component(s) were found.
340
339
Add the following snippet into your `scanoss.json` file
0 commit comments