diff --git a/unittests/test_tool.py b/unittests/test_tool.py index 37f714990ad3713cccf2d518cbb4aa2bc64833cc..214a654359b8bc222fd9820f8a67cc673d5d1bc8 100755 --- a/unittests/test_tool.py +++ b/unittests/test_tool.py @@ -769,30 +769,16 @@ def test_validation_error_print(capsys): # there should be no server interaction since we only test the behavior if a validation error # occurs during the data collection stage DATADIR = os.path.join(os.path.dirname(__file__), "test_data", "failing_validation") - ret = crawler_main(DATADIR, - os.path.join(DATADIR, "cfood.yml"), - os.path.join(DATADIR, "identifiables.yml"), - True, - None, - False, - "/use_case_simple_presentation") - captured = capsys.readouterr() - assert "Couldn't validate" in captured.out - - -def test_validation_error_print_dict(capsys): - # there should be no server interaction since we only test the behavior if a validation error - # occurs during the data collection stage - DATADIR = os.path.join(os.path.dirname(__file__), "test_data", "failing_validation") - ret = crawler_main(DATADIR, - os.path.join(DATADIR, "cfood2.yml"), - os.path.join(DATADIR, "identifiables.yml"), - True, - None, - False, - "/use_case_simple_presentation") - # captured = capsys.readouterr() - # assert "Couldn't validate" in captured.out + for fi in ["cfood.yml", "cfood2.yml"]: + ret = crawler_main(DATADIR, + os.path.join(DATADIR, fi), + os.path.join(DATADIR, "identifiables.yml"), + True, + None, + False, + "/use_case_simple_presentation") + captured = capsys.readouterr() + assert "Couldn't validate" in captured.out def test_split_into_inserts_and_updates_backref(crawler_mocked_for_backref_test):