This commit is contained in:
Team3
2026-07-22 16:12:23 +02:00
commit f07ef9653d
851 changed files with 501480 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
"""Rollen-Auflösung: explizit konfiguriert oder harter Stopp — nie ein Default."""
import pytest
import config
def test_konfigurierte_rolle(monkeypatch):
monkeypatch.setenv("ROLLE_SCHNEIDEN", "minimax:minimax/MiniMax-M3")
assert config.resolve_role("schneiden") == ("minimax", "minimax/MiniMax-M3")
def test_unkonfigurierte_rolle_stoppt(monkeypatch):
monkeypatch.delenv("ROLLE_JUDGE", raising=False)
with pytest.raises(RuntimeError, match="kein Modell konfiguriert"):
config.resolve_role("judge")
def test_unbekannter_provider_stoppt(monkeypatch):
monkeypatch.setenv("ROLLE_SICHTEN", "openai:gpt-4")
with pytest.raises(RuntimeError, match="unbekannter Provider"):
config.resolve_role("sichten")
def test_fehlendes_modell_stoppt(monkeypatch):
monkeypatch.setenv("ROLLE_NACHFASS", "minimax")
with pytest.raises(RuntimeError, match="Modell fehlt"):
config.resolve_role("nachfass")
def test_alle_rollen_deklariert():
assert set(config.ROLLEN) == {"schneiden", "nachfass", "sichten", "judge"}