from typing import Any def test_entrypoint_builds_production_app_from_environment( monkeypatch: Any, ) -> None: import knowledge_adapter.entrypoint as entrypoint settings = object() application = object() calls: list[object] = [] monkeypatch.setattr(entrypoint, "Settings", lambda: settings) def build(settings_value: object) -> object: calls.append(settings_value) return application monkeypatch.setattr(entrypoint, "build_production_app", build) assert entrypoint.create_production_app() is application assert calls == [settings]