Skip to content

Commit b47752d

Browse files
committed
Add test to load_csv with mapping
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 6e16251 commit b47752d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_util.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,17 @@ def test_load_csv_without_mapping(self):
385385
result = util.load_csv(test_file)
386386
assert expected == result
387387

388+
def test_load_csv_with_mapping(self):
389+
test_file = get_test_loc('test_util/csv/about.csv')
390+
expected = [OrderedDict([
391+
('about_file_path', 'about.ABOUT'),
392+
('about_resource', '.'),
393+
('name', 'ABOUT tool'),
394+
('version', '0.8.1')])
395+
]
396+
result = util.load_csv(test_file, mapping_file=DEFAULT_MAPPING)
397+
assert expected == result
398+
388399
def test_get_about_file_path_from_csv_using_mapping(self):
389400
test_file = get_test_loc('test_util/csv/about.csv')
390401
expected = ['about.ABOUT']

0 commit comments

Comments
 (0)