Skip to content

Commit dfd9be4

Browse files
committed
Fixed #385 - update author field from ListField to StringField
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 169279b commit dfd9be4

File tree

7 files changed

+10
-34
lines changed

7 files changed

+10
-34
lines changed

src/attributecode/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ def set_standard_fields(self):
731731
('owner', StringField()),
732732
('owner_url', UrlField()),
733733
('contact', StringField()),
734-
('author', ListField()),
734+
('author', StringField()),
735735
('author_file', FileTextField()),
736736

737737
('vcs_tool', SingleLineField()),

tests/test_model.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -663,11 +663,7 @@ def test_About_dumps(self):
663663
copyright: Copyright (c) 2013-2014 nexB Inc.
664664
notice_file: NOTICE
665665
owner: nexB Inc.
666-
author:
667-
- Jillian Daguil
668-
- Chin Yeung Li
669-
- Philippe Ombredanne
670-
- Thomas Druez
666+
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez
671667
vcs_tool: git
672668
vcs_repository: https://github.com/dejacode/about-code-tool.git
673669
licenses:
@@ -817,7 +813,7 @@ def test_load_dict_as_dict_is_idempotent_ignoring_special(self):
817813
test = {
818814
'about_resource': ['.'],
819815
'attribute': 'yes',
820-
'author': ['Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez'],
816+
'author': 'Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez',
821817
'copyright': 'Copyright (c) 2013-2014 nexB Inc.',
822818
'description': 'AboutCode is a tool to process ABOUT files. An ABOUT file is a file.',
823819
'homepage_url': 'http://dejacode.org',
@@ -836,7 +832,7 @@ def test_load_dict_as_dict_is_idempotent_ignoring_special(self):
836832
'about_file_path': None,
837833
'about_resource': OrderedDict([('.', None)]),
838834
'attribute': 'yes',
839-
'author': ['Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez'],
835+
'author': 'Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez',
840836
'copyright': 'Copyright (c) 2013-2014 nexB Inc.',
841837
'description': 'AboutCode is a tool to process ABOUT files. An ABOUT file is a file.',
842838
'homepage_url': 'http://dejacode.org',
@@ -853,7 +849,7 @@ def test_about_model_class_from_dict_constructor(self):
853849
about_data = {
854850
'about_resource': ['.'],
855851
'attribute': 'yes',
856-
'author': ['Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez'],
852+
'author': 'Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez',
857853
'copyright': 'Copyright (c) 2013-2014 nexB Inc.',
858854
'description': 'AboutCode is a tool to process ABOUT files. An ABOUT file is a file.',
859855
'homepage_url': 'http://dejacode.org',

tests/testdata/test_model/dumps/about.ABOUT

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ name: AboutCode
44
version: 0.11.0
55

66
owner: nexB Inc.
7-
author:
8-
- Jillian Daguil
9-
- Chin Yeung Li
10-
- Philippe Ombredanne
11-
- Thomas Druez
7+
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez
128

139
homepage_url: http://dejacode.org
1410

tests/testdata/test_model/inventory/complete/about.ABOUT

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ name: AboutCode
44
version: 0.11.0
55

66
owner: nexB Inc.
7-
author:
8-
- Jillian Daguil
9-
- Chin Yeung Li
10-
- Philippe Ombredanne
11-
- Thomas Druez
7+
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez
128

139
homepage_url: http://dejacode.org
1410

tests/testdata/test_model/inventory/relative/about.ABOUT

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ name: AboutCode
44
version: 0.11.0
55

66
owner: nexB Inc.
7-
author:
8-
- Jillian Daguil
9-
- Chin Yeung Li
10-
- Philippe Ombredanne
11-
- Thomas Druez
7+
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez
128

139
homepage_url: http://dejacode.org
1410

tests/testdata/test_model/serialize/about.ABOUT

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ name: AboutCode
44
version: 0.11.0
55

66
owner: nexB Inc.
7-
author:
8-
- Jillian Daguil
9-
- Chin Yeung Li
10-
- Philippe Ombredanne
11-
- Thomas Druez
7+
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez
128

139
homepage_url: http://dejacode.org
1410

tests/testdata/test_model/special/about.ABOUT

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ name: AboutCode
44
version: 0.11.0
55

66
owner: nexB Inc.
7-
author:
8-
- Jillian Daguil
9-
- Chin Yeung Li
10-
- Philippe Ombredanne
11-
- Thomas Druez
7+
author: Jillian Daguil, Chin Yeung Li, Philippe Ombredanne, Thomas Druez
128

139
homepage_url: http://dejacode.org
1410

0 commit comments

Comments
 (0)