fix(platform): 汇总知识库问答与图表展示修复

This commit is contained in:
HTEWJ\26070045 authored and sophie committed 2026-08-07 10:07:00 +08:00
1 parent f615e56bb9
commit 87ea4ed8a9
41 files changed
+4569 -770

No files matched your search

+4 -4
View File
@@ -115,7 +115,7 @@ def test_kb_document_upload_and_sync_flow(app, client, monkeypatch, tmp_path):
monkeypatch.setattr(
dify_sync_module.KbDifySyncService,
'create_document_by_text',
lambda self, dataset_id, name, text: {'document': {'id': 'doc_test_001', 'name': name}},
lambda self, dataset_id, name, text, **kwargs: {'document': {'id': 'doc_test_001', 'name': name, 'indexing_status': 'completed'}},
)
sync_response = client.post(f'/api/kb/documents/{document_id}/sync', headers=admin_headers)
@@ -159,7 +159,7 @@ def test_integration_api_resolves_synced_document(app, client, monkeypatch, tmp_
monkeypatch.setattr(
dify_sync_module.KbDifySyncService,
'create_document_by_text',
lambda self, dataset_id, name, text: {'document': {'id': 'doc_integration_001', 'name': name}},
lambda self, dataset_id, name, text, **kwargs: {'document': {'id': 'doc_integration_001', 'name': name, 'indexing_status': 'completed'}},
)
sync_response = client.post(f'/api/kb/documents/{document_id}/sync', headers=admin_headers)
@@ -232,7 +232,7 @@ def test_sync_recreates_missing_remote_document_for_same_hash(app, client, monke
monkeypatch.setattr(
dify_sync_module.KbDifySyncService,
'create_document_by_text',
lambda self, dataset_id, name, text: {'document': {'id': 'doc_old_001', 'name': name}},
lambda self, dataset_id, name, text, **kwargs: {'document': {'id': 'doc_old_001', 'name': name, 'indexing_status': 'completed'}},
)
first_sync_response = client.post(f'/api/kb/documents/{document_id}/sync', headers=admin_headers)
@@ -252,7 +252,7 @@ def test_sync_recreates_missing_remote_document_for_same_hash(app, client, monke
monkeypatch.setattr(
dify_sync_module.KbDifySyncService,
'create_document_by_text',
lambda self, dataset_id, name, text: {'document': {'id': 'doc_new_001', 'name': name}},
lambda self, dataset_id, name, text, **kwargs: {'document': {'id': 'doc_new_001', 'name': name, 'indexing_status': 'completed'}},
)
second_sync_response = client.post(f'/api/kb/documents/{document_id}/sync', headers=admin_headers)