Skip to content

Commit 16f3d04

Browse files
committed
Add code for multi_line test
1 parent 839a30e commit 16f3d04

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/test_model.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,14 @@ def test_collect_inventory_populate_about_file_path(self):
11291129
result = abouts[0].about_file_path
11301130
assert expected == result
11311131

1132+
def test_collect_inventory_with_multi_line(self):
1133+
test_loc = get_test_loc('parse/multi_line.ABOUT')
1134+
errors, abouts = model.collect_inventory(test_loc)
1135+
assert [] == errors
1136+
expected_lic = [u'x11', u'mit', u'public-domain', u'bsd-simplified']
1137+
returned_lic = abouts[0].license.value
1138+
assert expected_lic == returned_lic
1139+
11321140
def test_collect_inventory_works_with_relative_paths(self):
11331141
# FIXME: This test need to be run under src/attributecode/
11341142
# or otherwise it will fail as the test depends on the launching
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
about_resource: .
2+
name: test
3+
license: |
4+
x11
5+
mit
6+
public-domain
7+
bsd-simplified

0 commit comments

Comments
 (0)