Skip to content

Commit

Permalink
test: update read/load_documents tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanorosanelli committed Sep 4, 2024
1 parent 2f7108a commit d353d18
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_load_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,17 @@ def test_load_documents():
assert len(docs) == 1


def test_read_fail():
"""Test read failure"""
file_path = f'{Path(__file__).parent}/files/silence.mp3'
with pytest.raises(ValueError) as exc:
read(file_path=file_path)
assert str(exc.value) == 'Unsupported file content type "audio/mpeg"'


def test_load_documents_fail():
"""Test load_documents failure"""
file_path = f'{Path(__file__).parent}/files/silence.mp3'
with pytest.raises(ValueError) as exc:
read(file_path=file_path)
load_documents(file_path=file_path)
assert str(exc.value) == 'Unsupported file content type "audio/mpeg"'

0 comments on commit d353d18

Please sign in to comment.