langchain/tests/integration_tests/document_loaders/test_joplin.py
Alon Diament 44abe925df
Add Joplin document loader (#5153)
# Add Joplin document loader

[Joplin](https://joplinapp.org/) is an open source note-taking app.

Joplin has a [REST API](https://joplinapp.org/api/references/rest_api/)
for accessing its local database. The proposed `JoplinLoader` uses the
API to retrieve all notes in the database and their metadata. Joplin
needs to be installed and running locally, and an access token is
required.

- The PR includes an integration test.
- The PR includes an example notebook.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-24 12:31:55 -07:00

12 lines
325 B
Python

from langchain.document_loaders.joplin import JoplinLoader
def test_joplin_loader() -> None:
loader = JoplinLoader()
docs = loader.load()
assert type(docs) is list
assert type(docs[0].page_content) is str
assert type(docs[0].metadata["source"]) is str
assert type(docs[0].metadata["title"]) is str