Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

Adjust tests for chat.delete and search API

Edwin Jose854970b7a08d
diff --git a/tests/integration/sdk/test_errors.py b/tests/integration/sdk/test_errors.py
index 30ce68dd2..511cc7f95 100644
--- a/tests/integration/sdk/test_errors.py
+++ b/tests/integration/sdk/test_errors.py
@@ -42,12 +42,10 @@ class TestErrorHandling:
await client.chat.get(str(uuid.uuid4()))
@pytest.mark.asyncio
- async def test_delete_nonexistent_conversation_raises_not_found(self, client):
- """Deleting a conversation that never existed must raise NotFoundError."""
- from openrag_sdk.exceptions import NotFoundError
-
- with pytest.raises(NotFoundError):
- await client.chat.delete(str(uuid.uuid4()))
+ async def test_delete_nonexistent_conversation_returns_false(self, client):
+ """Deleting a conversation that never existed must return False."""
+ result = await client.chat.delete(str(uuid.uuid4()))
+ assert result is False
@pytest.mark.asyncio
async def test_invalid_settings_value_raises_error(self, client):
diff --git a/tests/integration/sdk/test_search.py b/tests/integration/sdk/test_search.py
index f0acf9819..aa4cb430a 100644
--- a/tests/integration/sdk/test_search.py
+++ b/tests/integration/sdk/test_search.py
@@ -72,5 +72,5 @@ class TestSearchExtended:
results = await client.search.query("purple elephants dancing", limit=5)
for result in results.results:
- assert result.content is not None
- assert isinstance(result.content, str)
+ assert result.text is not None
+ assert isinstance(result.text, str)