1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2024-12-22 04:02:19 +01:00

tests/test_check.py: Update suspicious character check

The suspicious character check was updated to include the name of
the field where the metadata value with the  suspicious character
exists.
This commit is contained in:
Alan Orth 2019-08-09 01:26:13 +03:00
parent 62fea95087
commit d93c2aae13
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -112,10 +112,12 @@ def test_check_suspicious_characters(capsys):
value = 'foreˆt'
check.suspicious_characters(value)
field_name = 'dc.contributor.author'
check.suspicious_characters(value, field_name)
captured = capsys.readouterr()
assert captured.out == f'Suspicious character: {value}\n'
assert captured.out == f'Suspicious character ({field_name}): ˆt\n'
def test_check_valid_iso639_2_language():