Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
skoob13 committed Oct 28, 2024
1 parent e360d47 commit 067db1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ee/hogai/test/test_assistant.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
from unittest.mock import patch

import pytest
from django.test import override_settings
from langchain_core.runnables import RunnableLambda

Expand All @@ -15,6 +16,7 @@

@override_settings(IN_UNIT_TESTING=True)
class TestAssistant(NonAtomicBaseTest):
@pytest.mark.django_db(transaction=True)
def test_assistant(self):
mocked_planner_response = """
Action:
Expand All @@ -37,6 +39,7 @@ def test_assistant(self):
generator = assistant.stream(
Conversation(messages=[HumanMessage(content="Launch the chain.")], session_id="id")
)
self.assertEqual(next(generator), "")
self.assertEqual(
json.loads(next(generator)),
VisualizationMessage(answer=None, reasoning_steps=[], plan="Plan").model_dump(),
Expand Down

0 comments on commit 067db1f

Please sign in to comment.