diff --git a/certbot-ci/certbot_integration_tests/certbot_tests/__init__.py b/certbot-ci/certbot_integration_tests/certbot_tests/__init__.py index e69de29bb..60c2fcdd8 100644 --- a/certbot-ci/certbot_integration_tests/certbot_tests/__init__.py +++ b/certbot-ci/certbot_integration_tests/certbot_tests/__init__.py @@ -0,0 +1,5 @@ +import pytest + +# Custom assertions defined in the following package need to be registered to be properly +# displayed in a pytest report when they are failing. +pytest.register_assert_rewrite('certbot_integration_tests.certbot_tests.assertions') diff --git a/certbot-ci/certbot_integration_tests/certbot_tests/assertions.py b/certbot-ci/certbot_integration_tests/certbot_tests/assertions.py index 6e085838a..e53221c0d 100644 --- a/certbot-ci/certbot_integration_tests/certbot_tests/assertions.py +++ b/certbot-ci/certbot_integration_tests/certbot_tests/assertions.py @@ -12,8 +12,7 @@ def assert_hook_execution(probe_path, probe_content): with open(probe_path, 'r') as file: lines = file.readlines() - # Comparing pattern to each line avoids to match "pre" for a line with "pre-override" - assert [line for line in lines if line == '{0}{1}'.format(probe_content, os.linesep)] + assert '{0}{1}'.format(probe_content, os.linesep) in lines def assert_save_renew_hook(config_dir, lineage): diff --git a/certbot-ci/certbot_integration_tests/certbot_tests/conftest.py b/certbot-ci/certbot_integration_tests/certbot_tests/conftest.py deleted file mode 100644 index 60c2fcdd8..000000000 --- a/certbot-ci/certbot_integration_tests/certbot_tests/conftest.py +++ /dev/null @@ -1,5 +0,0 @@ -import pytest - -# Custom assertions defined in the following package need to be registered to be properly -# displayed in a pytest report when they are failing. -pytest.register_assert_rewrite('certbot_integration_tests.certbot_tests.assertions')