feat: 저작권 탭 경량 응답 API 추가
This commit is contained in:
1 parent
91e356e4c1
commit
6dd5fa4a2e
6 files changed
+339
-362
No files matched your search
@@ -42,6 +42,29 @@ def test_detect_returns_schema():
|
||||
assert "engine_version" in body
|
||||
|
||||
|
||||
def test_copyright_review_returns_only_mobile_tab_fields():
|
||||
with TestClient(app) as client:
|
||||
resp = client.post(
|
||||
"/v1/plagiarism/review",
|
||||
json={"doc_id": "mobile-1", "text": "창밖으로 보이는 숲은 오늘따라 푸르게 보였다."},
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
body = resp.json()
|
||||
assert set(body) == {
|
||||
"doc_id", "copyright", "similar_sentences",
|
||||
"ai_generation_suspicion", "legal_judgment", "analyzed_at",
|
||||
}
|
||||
assert 0 <= body["copyright"]["originality_percent"] <= 100
|
||||
assert body["copyright"]["description"]
|
||||
assert body["similar_sentences"]["label"].endswith("건")
|
||||
assert body["ai_generation_suspicion"]["label"] in {
|
||||
"낮음", "중간", "높음", "확인 불가",
|
||||
}
|
||||
assert "matches" not in body
|
||||
assert "extracted_elements" not in body
|
||||
assert "score_semantics" not in body
|
||||
|
||||
|
||||
def test_batch_flow():
|
||||
with TestClient(app) as client:
|
||||
resp = client.post(
|
||||
|
||||
Reference in new issue
Block a user