Skip to content

Commit 9d0a635

Browse files
committed
Merge branch '349_yaml_output_review' into develop
2 parents 80455d0 + c066d97 commit 9d0a635

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

tests/test_util.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,31 @@ def test_get_relative_path_with_same_path_twice(self):
267267
assert expected == result
268268

269269
def test_get_mapping_key_order(self):
270-
expected = ['about_file_path', 'name', 'version', 'copyright', 'license_expression', 'resource']
270+
import collections
271+
expected = collections.OrderedDict()
272+
expected['about_file_path'] = ''
273+
expected['name'] = ''
274+
expected['version'] = ''
275+
expected['copyright'] = ''
276+
expected['license_expression'] = ''
277+
expected['resource'] = ''
278+
expected_keys = expected.keys()
271279
result = util.get_mapping_key_order(mapping_file=False)
272-
assert expected == result
280+
assert expected_keys == result
273281

274282
def test_get_mapping_key_order_with_mapping_file(self):
275-
expected = ['about_file_path', 'name', 'version', 'description', 'license_expression', 'copyright']
283+
import collections
284+
expected = collections.OrderedDict()
285+
expected['about_file_path'] = ''
286+
expected['name'] = ''
287+
expected['version'] = ''
288+
expected['description'] = ''
289+
expected['license_expression'] = ''
290+
expected['copyright'] = ''
291+
expected_keys = expected.keys()
276292
test_mapping_file = get_test_loc('mapping_config/mapping.config')
277293
result = util.get_mapping_key_order(test_mapping_file)
278-
assert expected == result
294+
assert expected_keys == result
279295

280296
def test_load_csv_without_mapping(self):
281297
test_file = get_test_loc('util/about.csv')

0 commit comments

Comments
 (0)