Files
noteflow/tests/integration/test_trigger_settings.py
Travis Vasceannie 4eef1b3be6 Add summarization and trigger services
- Introduced `SummarizationService` and `TriggerService` to orchestrate summarization and trigger detection functionalities.
- Added new modules for summarization, including citation verification and cloud-based summarization providers.
- Implemented trigger detection based on audio activity and foreground application status.
- Updated project configuration to include new dependencies for summarization and trigger functionalities.
- Created tests for summarization and trigger services to ensure functionality and reliability.
2025-12-18 00:08:51 +00:00

30 lines
1.0 KiB
Python

"""Integration tests for trigger settings loading."""
from __future__ import annotations
import pytest
from noteflow.config.settings import get_trigger_settings
pytestmark = pytest.mark.integration
@pytest.fixture(autouse=True)
def _clear_trigger_settings_cache() -> None:
get_trigger_settings.cache_clear()
def test_trigger_settings_env_parsing(monkeypatch: pytest.MonkeyPatch) -> None:
"""TriggerSettings should parse CSV lists from environment variables."""
monkeypatch.setenv("NOTEFLOW_TRIGGER_MEETING_APPS", "zoom, teams")
monkeypatch.setenv("NOTEFLOW_TRIGGER_SUPPRESSED_APPS", "spotify")
monkeypatch.setenv("NOTEFLOW_TRIGGER_AUDIO_MIN_SAMPLES", "5")
monkeypatch.setenv("NOTEFLOW_TRIGGER_POLL_INTERVAL_SECONDS", "1.5")
settings = get_trigger_settings()
assert settings.trigger_meeting_apps == ["zoom", "teams"]
assert settings.trigger_suppressed_apps == ["spotify"]
assert settings.trigger_audio_min_samples == 5
assert settings.trigger_poll_interval_seconds == pytest.approx(1.5)