diff --git a/tests/test_extract_odf_links.py b/tests/test_extract_odf_links.py index 1e4f2b8801f92b80a4622f963f6750c8ed6d7f28..e7dea3ae4488fb63566535d6c500886ace2f23b4 100644 --- a/tests/test_extract_odf_links.py +++ b/tests/test_extract_odf_links.py @@ -26,6 +26,7 @@ from . import testutil from conservancy_beancount.tools import extract_odf_links SRC_PATH = testutil.test_path('repository/LinksReport.ods') +BAD_PATH_S = str(testutil.test_path('repository/Projects/Bad Link.txt')) INCLUDED_FILE_LINKS = { Path('/repository/Projects/project-data.yml'), @@ -63,7 +64,8 @@ def test_extract_file_links(arglist, sep, caplog): assert caplog.records assert any( log.levelname == 'WARNING' - and log.message.endswith('/Bad Link.txt not found') + and log.message.startswith('link path not found: ') + and log.message.endswith(BAD_PATH_S) for log in caplog.records )