Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.
Python agentsai-hackingai-penetration-testingai-pentestingai-securityartificial-intelligencebug-bountycode-qualityctf-toolscybersecuritycybersecurity-toolsethical-hackinghackingllm-securityoffensive-securitypenetration-testingpentesting-toolsred-teamingsecuritysecurity-automation
test(preflight): exercise warm_up_llm with a dedicated dedupe model without touching process-wide SDK defaults
Ahmed Allame3401c4fc71d
diff --git a/tests/test_preflight_timeout.py b/tests/test_preflight_timeout.pyindex eb0209de..cf2192f8 100644--- a/tests/test_preflight_timeout.py+++ b/tests/test_preflight_timeout.py@@ -3,17 +3,21 @@from __future__ import annotationsimport asyncio+import importlibimport timefrom typing import TYPE_CHECKING, Anyimport pytest-import strix.interface.main as cli_mainfrom strix.config import load_settings, loaderfrom strix.interface import scan_setupfrom strix.interface.scan_setup import preflight_model_connection, preflight_request+# ``strix.interface`` re-exports the ``main`` function, which shadows the submodule name.+cli_main: Any = importlib.import_module("strix.interface.main")++if TYPE_CHECKING:from pathlib import Path@@ -108,6 +112,7 @@ def test_warm_up_checks_the_dedupe_model_with_its_own_headers_and_the_preflight_monkeypatch.setattr(scan_setup, "preflight_request", record)monkeypatch.setattr(cli_main, "preflight_request", record)+ monkeypatch.setattr("strix.config.models.configure_sdk_model_defaults", lambda _settings: None)monkeypatch.setattr("strix.report.dedupe.resolve_dedupe_model", lambda _dedupe, _name: dedupe_model)