from app.ws_gateway import main as main_module


def test_audio_flow_burst_gap_controls_repeated_logs(monkeypatch) -> None:
    monkeypatch.setattr(main_module, "FLOW_AUDIO_BURST_GAP_S", 0.8)

    assert main_module._is_new_audio_burst(10.0, 0.0) is True
    assert main_module._is_new_audio_burst(10.5, 10.0) is False
    assert main_module._is_new_audio_burst(10.8, 10.0) is True
