# Feature: llm-batch-matching, Property 6: Config-Validierung """Property-based test for azure_openai.max_concurrency config validation. **Validates: Requirements 2.1, 2.3, 2.4** """ from hypothesis import given from hypothesis import strategies as st import pytest from teamlandkarte_mcp.config import ( AzureOpenAIConfig, ConfigError, _parse_azure_openai, ) @given(n=st.integers(min_value=-100, max_value=100)) def test_max_concurrency_valid_iff_in_range(n: int) -> None: """max_concurrency succeeds iff 1 <= n <= 50, else ConfigError.""" cfg = { "max_concurrency": n, "endpoint": "https://test.example.com", "chat_deployment": "test", } if 1 <= n <= 50: result = _parse_azure_openai(cfg) assert isinstance(result, AzureOpenAIConfig) assert result.max_concurrency == n else: with pytest.raises(ConfigError): _parse_azure_openai(cfg)