Skip to content

Commit b5abedd

Browse files
committed
update test code
1 parent 4f5de13 commit b5abedd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

about_code_tool/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ def get_dje_license_name(self):
936936
Return the dje_license value if the dje_license field exists
937937
"""
938938
try:
939-
return self.parsed['dje_license_name']
939+
return self.parsed['dje_license']
940940
except Exception as e:
941941
pass
942942

about_code_tool/tests/test_about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def test_header_row_in_csv_output(self):
9494
'license_spdx,redistribute,attribute,track_changes,vcs_tool,' \
9595
'vcs_repository,vcs_path,vcs_tag,vcs_branch,vcs_revision,' \
9696
'checksum_sha1,checksum_md5,checksum_sha256,dje_component,' \
97-
'dje_license,dje_organization,warnings,errors'
97+
'dje_license,dje_organization,dje_license_name,warnings,errors'
9898

9999
input = "about_code_tool/tests/testdata/basic"
100100
temp_file = tempfile.NamedTemporaryFile(suffix='.csv', delete=True)

about_code_tool/tests/test_genabout.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def test_get_dje_license_list_gen_license_with_dje_license_key_empty_license_tex
231231
gen_location = join(TESTDATA_PATH, "test_files_for_genabout/")
232232
input_list = [{'about_file': '/about.py.ABOUT', 'version': '0.8.1',
233233
'about_resource': '.', 'name': 'ABOUT tool',
234-
'license_text_file': '', 'dje_license_key': 'apache-2.0'}]
234+
'license_text_file': '', 'dje_license': 'apache-2.0'}]
235235
expected_output_list = [('/', 'apache-2.0')]
236236
gen_license = True
237237
lic_output_list = gen.get_dje_license_list(gen_location, input_list, gen_license)
@@ -244,7 +244,7 @@ def test_get_dje_license_list_gen_license_with_empty_dje_license_key_empty_licen
244244
gen_location = join(TESTDATA_PATH, "test_files_for_genabout/")
245245
input_list = [{'about_file': '/about.py.ABOUT', 'version': '0.8.1',
246246
'about_resource': '.', 'name': 'ABOUT tool',
247-
'license_text_file': '', 'dje_license_key': ''}]
247+
'license_text_file': '', 'dje_license': ''}]
248248
expected_output_list = []
249249
gen_license = True
250250
lic_output_list = gen.get_dje_license_list(gen_location, input_list, gen_license)
@@ -257,7 +257,7 @@ def test_get_dje_license_list_gen_license_with_dje_license_key_no_license_text_f
257257
gen_location = join(TESTDATA_PATH, "test_files_for_genabout/")
258258
input_list = [{'about_file': '/about.py.ABOUT', 'version': '0.8.1',
259259
'about_resource': '.', 'name': 'ABOUT tool',
260-
'dje_license_key': 'apache-2.0'}]
260+
'dje_license': 'apache-2.0'}]
261261
expected_output_list = [('/', 'apache-2.0')]
262262
gen_license = True
263263
lic_output_list = gen.get_dje_license_list(gen_location, input_list, gen_license)
@@ -433,7 +433,7 @@ def test_verify_license_files_no_key(self):
433433
def test_gen_license_list_license_text_file_no_value(self):
434434
gen = genabout.GenAbout()
435435
input_list = {'about_file': '/tmp/3pp/opensans/', 'name': 'OpenSans Fonts',
436-
'version': '1', 'dje_license_key': 'apache-2.0',
436+
'version': '1', 'dje_license': 'apache-2.0',
437437
'license_text_file': '', 'about_resource': 'opensans'}
438438
expected_list = ('/tmp/3pp', 'apache-2.0')
439439
output = gen.gen_license_list(input_list)
@@ -443,7 +443,7 @@ def test_gen_license_list_license_text_file_no_value(self):
443443
def test_gen_license_list_no_license_text_file_key(self):
444444
gen = genabout.GenAbout()
445445
input_list = {'about_file': '/tmp/3pp/opensans/', 'name': 'OpenSans Fonts',
446-
'version': '1', 'dje_license_key': 'apache-2.0',
446+
'version': '1', 'dje_license': 'apache-2.0',
447447
'about_resource': 'opensans'}
448448
expected_list = ('/tmp/3pp', 'apache-2.0')
449449
output = gen.gen_license_list(input_list)

0 commit comments

Comments
 (0)