File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/conftest.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/conftest.py
2
+ index 887e807e3..d821797be 100644
3
+ --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/conftest.py
4
+ +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-mongodb/tests/conftest.py
5
+ @@ -1,6 +1,7 @@
6
+ import os
7
+ from typing import List
8
+ import pytest
9
+ + from llama_index.core import SimpleDirectoryReader
10
+ from llama_index.core.ingestion import IngestionPipeline
11
+ from llama_index.core.node_parser import SentenceSplitter
12
+ from llama_index.core.schema import Document, TextNode
13
+ @@ -11,16 +12,18 @@ from pymongo import MongoClient
14
+ OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
15
+
16
+ import threading
17
+ + from pathlib import Path
18
+
19
+ lock = threading.Lock()
20
+
21
+
22
+ @pytest.fixture(scope="session")
23
+ - def documents() -> List[Document]:
24
+ + def documents(tmp_path_factory) -> List[Document]:
25
+ """List of documents represents data to be embedded in the datastore.
26
+ Minimum requirements for Documents in the /upsert endpoint's UpsertRequest.
27
+ """
28
+ - return [Document.example()]
29
+ + data_dir = Path(__file__).parents[4] / "docs/docs/examples/data/paul_graham"
30
+ + return SimpleDirectoryReader(data_dir).load_data()
31
+
32
+
33
+ @pytest.fixture(scope="session")
You can’t perform that action at this time.
0 commit comments