29 lines
934 B
Python
29 lines
934 B
Python
from server.config import config, EscalationConfig, ModelConfig, AppConfig
|
|
|
|
|
|
def test_config_defaults():
|
|
"""Config loads with sane defaults."""
|
|
assert config.port == 8400
|
|
assert config.host == "0.0.0.0"
|
|
assert config.device == "cuda"
|
|
|
|
|
|
def test_escalation_defaults():
|
|
"""Escalation config has correct default rate and timing."""
|
|
assert config.escalation.rate == 0.05
|
|
assert config.escalation.initial_batch_size == 40
|
|
assert config.escalation.max_images == 200
|
|
assert config.escalation.max_audio_clips == 50
|
|
|
|
|
|
def test_model_defaults():
|
|
"""Model config points to correct model IDs."""
|
|
assert "sdxl-turbo" in config.models.sdxl_model_id
|
|
assert "xtts" in config.models.xtts_model
|
|
|
|
|
|
def test_timing_defaults():
|
|
"""Timing ranges are ordered correctly."""
|
|
assert config.escalation.asset_swap_min < config.escalation.asset_swap_max
|
|
assert config.escalation.voice_mean_interval > 0
|