1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2025-05-08 14:16:00 +02:00

Update tests

This commit is contained in:
2019-08-01 23:59:11 +03:00
parent 0ed390dbd5
commit 456b8a2f26
3 changed files with 28 additions and 25 deletions

View File

@ -175,18 +175,20 @@ def test_check_invalid_agrovoc(capsys):
'''Test invalid AGROVOC subject.'''
value = 'FOREST'
field_name = 'dc.subject'
check.agrovoc(value)
check.agrovoc(value, field_name)
captured = capsys.readouterr()
assert captured.out == f'Invalid AGROVOC subject: {value}\n'
assert captured.out == f'Invalid AGROVOC ({field_name}): {value}\n'
def test_check_valid_agrovoc():
'''Test valid AGROVOC subject.'''
value = 'FORESTS'
field_name = 'dc.subject'
result = check.agrovoc(value)
result = check.agrovoc(value, field_name)
assert result == value