22 lines
1.2 KiB
Python
22 lines
1.2 KiB
Python
"""Konsens ohne 2-Quellen-Regel: 1 wörtlicher Beleg genügt (Zitat-Gate schützt);
|
|
ohne Beleg bleibt der Punkt Kandidat."""
|
|
from backend import db, korpus
|
|
from .conftest import topic_anlegen
|
|
|
|
|
|
async def test_einzelbeleg_bestaetigt_ohne_beleg_nicht():
|
|
topic = topic_anlegen()
|
|
run_id = db.insert("runs", topic=topic, status="running")
|
|
q_blog = db.insert("quellen", topic=topic, url="https://blog.de/x",
|
|
url_norm="u2", backend="ddgs", status="geladen")
|
|
db.insert("soll", topic=topic, punkt="Blog-These mit Beleg",
|
|
belege=db.j([{"quelle": q_blog, "zitat": "z2"}]))
|
|
db.insert("soll", topic=topic, punkt="These ohne Beleg", belege=db.j([]))
|
|
await korpus.soll_konsens({"run_id": run_id, "topic": topic, "runde": 1,
|
|
"knoten": "soll_konsens", "item": "r1:konsens",
|
|
"payload": "{}"})
|
|
mit = db.one("SELECT status FROM soll WHERE punkt LIKE 'Blog-These%'")
|
|
ohne = db.one("SELECT status FROM soll WHERE punkt LIKE 'These ohne%'")
|
|
assert mit["status"] == "bestaetigt" # 1 wörtlicher Beleg reicht
|
|
assert ohne["status"] == "kandidat" # ohne Beleg keine Bestätigung
|