test: 补强资料包关联会话跳转证据
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user