MCPcopy Create free account
hub / github.com/Emmimal/control-layer / TestPydanticConfig

Class TestPydanticConfig

tests/test_control_layer.py:586–603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584# =============================================================================
585
586class TestPydanticConfig:
587
588 def test_defaults_valid(self):
589 config = ControlLayerConfig()
590 assert config.total_tokens == 800
591 assert config.max_attempts == 3
592
593 def test_custom_values_accepted(self):
594 config = ControlLayerConfig(total_tokens=4096, max_attempts=5, timeout_seconds=60.0)
595 assert config.total_tokens == 4096
596
597 def test_total_tokens_too_low_rejected(self):
598 with pytest.raises(Exception):
599 ControlLayerConfig(total_tokens=10)
600
601 def test_max_delay_lt_base_rejected(self):
602 with pytest.raises(Exception):
603 ControlLayerConfig(base_delay_ms=1000, max_delay_ms=100)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected