Skip to content

Commit

Permalink
update document extractor unit test for docx file
Browse files Browse the repository at this point in the history
  • Loading branch information
AugNSo committed Jan 22, 2025
1 parent de1aa87 commit c820eda
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from core.workflow.entities.node_entities import NodeRunResult
from core.workflow.nodes.document_extractor import DocumentExtractorNode, DocumentExtractorNodeData
from core.workflow.nodes.document_extractor.node import (
_extract_text_from_doc,
_extract_text_from_docx,
_extract_text_from_pdf,
_extract_text_from_plain_text,
)
Expand Down Expand Up @@ -170,7 +170,7 @@ def test_extract_text_from_doc(mock_document):
mock_paragraph2.text = "Paragraph 2"
mock_document.return_value.paragraphs = [mock_paragraph1, mock_paragraph2]

text = _extract_text_from_doc(b"PK\x03\x04")
text = _extract_text_from_docx(b"PK\x03\x04")
assert text == "Paragraph 1\nParagraph 2"


Expand Down

0 comments on commit c820eda

Please sign in to comment.