From e3401c4fc71d41d9d12c912f7f3db96ffd7422b9 Mon Sep 17 00:00:00 2001 From: Ahmed Allam Date: Sun, 4 Oct 2026 19:36:43 +0000 Subject: [PATCH] test(preflight): exercise warm_up_llm with a dedicated dedupe model without touching process-wide SDK defaults --- tests/test_preflight_timeout.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_preflight_timeout.py b/tests/test_preflight_timeout.py index eb0209de..cf2192f8 100644 --- a/tests/test_preflight_timeout.py +++ b/tests/test_preflight_timeout.py @@ -3,17 +3,21 @@ from __future__ import annotations import asyncio +import importlib import time from typing import TYPE_CHECKING, Any import pytest -import strix.interface.main as cli_main from strix.config import load_settings, loader from strix.interface import scan_setup from 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 )