chATLAS_Chains 0.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
tests/test_utils.py ADDED
@@ -0,0 +1,27 @@
1
+ from unittest.mock import MagicMock
2
+
3
+ from chATLAS_Chains.utils.doc_utils import combine_documents # Replace with actual import path
4
+ from chATLAS_Embed.Base import Document
5
+
6
+
7
+ def test_combine_documents_returns_string():
8
+ # Arrange: Create mock Document objects
9
+ mock1 = MagicMock(spec=Document)
10
+ mock1.page_content = "Hello."
11
+ mock1.metadata = {
12
+ "last_modification": "2025-04-08", # Add mock metadata
13
+ "name": "Document 1",
14
+ }
15
+
16
+ mock2 = MagicMock(spec=Document)
17
+ mock2.page_content = "Hola."
18
+ mock2.metadata = {
19
+ "last_modification": "2025-04-08", # Add mock metadata
20
+ "name": "Document 2",
21
+ }
22
+
23
+ # Act: Combine documents
24
+ result = combine_documents([mock1, mock2])
25
+
26
+ # Assert: Check that result is a string
27
+ assert isinstance(result, str), "combine_documents should return a string"