From 1b6a09f7868291b1350eeb96d76043d651087b8c Mon Sep 17 00:00:00 2001 From: bruce Date: Thu, 4 Jun 2026 04:38:33 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E8=A1=A5=E5=BC=BA=E8=B5=84=E6=96=99?= =?UTF-8?q?=E5=8C=85=E5=85=B3=E8=81=94=E4=BC=9A=E8=AF=9D=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E8=AF=81=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_documents.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/test_documents.py b/tests/test_documents.py index ef0ea94..c3a71ee 100644 --- a/tests/test_documents.py +++ b/tests/test_documents.py @@ -251,6 +251,25 @@ def test_document_list_supports_batch_id_search(client, db): assert "SUB-20260604-001" not in content +def test_document_list_shows_link_to_bound_conversation(client, db): + SubmissionBatch.objects.create( + batch_id="SUB-20260604-201", + product_name="产品C", + workflow_type="registration", + conversation_id="conv-201", + file_count=2, + page_count=12, + import_status="completed", + ) + + response = client.get(reverse("documents:list")) + + content = response.content.decode("utf-8") + assert response.status_code == 200 + assert "查看对话 conv-201" in content + assert reverse("chat:detail", args=["conv-201"]) in content + + def test_build_document_list_context_filters_batches_by_keyword(db): target_batch = SubmissionBatch.objects.create( batch_id="SUB-20260604-101",