diff --git a/tests/test_username.py b/tests/test_username.py index d876b43..cbe1ca7 100644 --- a/tests/test_username.py +++ b/tests/test_username.py @@ -1,6 +1,18 @@ """Tests for the username enumeration plugin.""" -from plugins.username import ( +import importlib.util +import sys +from pathlib import Path + +# plugins/ is not a Python package -- load the module from file path +_spec = importlib.util.spec_from_file_location( + "plugins.username", Path(__file__).resolve().parent.parent / "plugins" / "username.py", +) +_mod = importlib.util.module_from_spec(_spec) +sys.modules[_spec.name] = _mod +_spec.loader.exec_module(_mod) + +from plugins.username import ( # noqa: E402 _BY_CATEGORY, _BY_NAME, _SERVICES,