diff --git a/tests/test_crtsh.py b/tests/test_crtsh.py index 08cf8fe..5f427fc 100644 --- a/tests/test_crtsh.py +++ b/tests/test_crtsh.py @@ -1,8 +1,19 @@ """Tests for the crt.sh certificate transparency plugin.""" +import importlib.util +import sys from datetime import datetime, timezone +from pathlib import Path -from plugins.crtsh import ( +# plugins/ is not a Python package -- load the module from file path +_spec = importlib.util.spec_from_file_location( + "plugins.crtsh", Path(__file__).resolve().parent.parent / "plugins" / "crtsh.py", +) +_mod = importlib.util.module_from_spec(_spec) +sys.modules[_spec.name] = _mod +_spec.loader.exec_module(_mod) + +from plugins.crtsh import ( # noqa: E402 deduplicate, format_result, is_expired,