Skip to content

Commit 2d59a69

Browse files
committed
Add read pdf, docs tests
1 parent 9f3d259 commit 2d59a69

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

app/tests/test_read_docs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pytest
2+
from src.file_processor import FileProcessor
3+
4+
def test_read_docx():
5+
file_processor = FileProcessor()
6+
with open("data/input/test.docx", "rb") as file:
7+
file_processor.file = file
8+
file_processor.file_type = ".txt"
9+
content = file_processor._read_docx
10+
assert len(content) > 0, "Your summarize is empty"

app/tests/test_read_pdf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
from src.file_processor import FileProcessor
3+
4+
5+
def test_read_pdf():
6+
file_processor = FileProcessor()
7+
with open("data/input/fanatyk.pdf", "rb") as file:
8+
file_processor.file = file
9+
file_processor.file_type = ".pdf"
10+
content = file_processor._read_pdf()
11+
assert len(content) > 0, "Your summarize is empty"
12+

0 commit comments

Comments
 (0)