Core modules: TUI app (textual), mumble protocol client, audio pipeline (sounddevice + opus), push-to-talk with kitty protocol / evdev / toggle backends. Config via TOML.
24 lines
582 B
Python
24 lines
582 B
Python
"""Tests for configuration module."""
|
|
|
|
from tuimble.config import Config, PttConfig, ServerConfig
|
|
|
|
|
|
def test_default_config():
|
|
cfg = Config()
|
|
assert cfg.server.host == "localhost"
|
|
assert cfg.server.port == 64738
|
|
assert cfg.audio.sample_rate == 48000
|
|
assert cfg.ptt.mode == "hold"
|
|
|
|
|
|
def test_server_config():
|
|
srv = ServerConfig(host="mumble.example.com", port=12345)
|
|
assert srv.host == "mumble.example.com"
|
|
assert srv.port == 12345
|
|
|
|
|
|
def test_ptt_config_defaults():
|
|
ptt = PttConfig()
|
|
assert ptt.key == "space"
|
|
assert ptt.backend == "auto"
|