mirror of
https://github.com/ilri/csv-metadata-quality.git
synced 2024-12-22 04:02:19 +01:00
tests/test_check.py: Add tests for file extensions
This commit is contained in:
parent
9ce7dc6716
commit
62ef2a4489
@ -194,3 +194,24 @@ def test_check_valid_agrovoc():
|
||||
result = check.agrovoc(value, field_name)
|
||||
|
||||
assert result == value
|
||||
|
||||
|
||||
def test_check_uncommon_filename_extension(capsys):
|
||||
'''Test uncommon filename extension.'''
|
||||
|
||||
value = 'file.pdf.lck'
|
||||
|
||||
result = check.filename_extension(value)
|
||||
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == f'Filename with uncommon extension: {value}\n'
|
||||
|
||||
|
||||
def test_check_common_filename_extension():
|
||||
'''Test common filename extension.'''
|
||||
|
||||
value = 'file.pdf'
|
||||
|
||||
result = check.filename_extension(value)
|
||||
|
||||
assert result == value
|
||||
|
Loading…
Reference in New Issue
Block a user