diff --git a/certbot/src/certbot/_internal/plugins/apache/constants.py b/certbot/src/certbot/_internal/plugins/apache/constants.py index d6d9f02c7..b37a943b3 100644 --- a/certbot/src/certbot/_internal/plugins/apache/constants.py +++ b/certbot/src/certbot/_internal/plugins/apache/constants.py @@ -45,7 +45,7 @@ def _generate_augeas_lens_dir_static() -> str: file_manager = ExitStack() atexit.register(file_manager.close) augeas_lens_dir_ref = importlib.resources.files("certbot") / "_internal" \ - "plugins" / "apache" / "augeas_lens" + / "plugins" / "apache" / "augeas_lens" return str(file_manager.enter_context(importlib.resources.as_file(augeas_lens_dir_ref))) AUGEAS_LENS_DIR = _generate_augeas_lens_dir_static() diff --git a/certbot/src/certbot/_internal/tests/plugins/apache/constants_test.py b/certbot/src/certbot/_internal/tests/plugins/apache/constants_test.py new file mode 100644 index 000000000..d155b85be --- /dev/null +++ b/certbot/src/certbot/_internal/tests/plugins/apache/constants_test.py @@ -0,0 +1,15 @@ +"""Tests for certbot._internal.plugins.apache.constants""" +import sys +import os.path + +import pytest + +from certbot._internal.plugins.apache import constants + + +def test_augeas_lens_dir_exists(): + assert os.path.exists(constants.AUGEAS_LENS_DIR) + + +if __name__ == "__main__": + sys.exit(pytest.main(sys.argv[1:] + [__file__])) # pragma: no cover