We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70d2450 commit bfbfc65Copy full SHA for bfbfc65
1 file changed
tests/test_agents.py
@@ -1,10 +1,21 @@
1
from __future__ import annotations
2
3
+from unittest.mock import create_autospec
4
+
5
+import pytest
6
+from agents.models.interface import Model
7
8
from bot.agents import DEFAULT_INSTRUCTIONS
9
from bot.agents import MAX_TURNS
10
from bot.agents import OpenAIAgent
11
12
13
+@pytest.fixture(autouse=True)
14
+def _mock_model(monkeypatch):
15
+ """Prevent tests from constructing a real OpenAI client."""
16
+ monkeypatch.setattr("bot.agents._get_model", lambda: create_autospec(Model))
17
18
19
class TestPerChatConversations:
20
def test_separate_chats_have_independent_history(self):
21
"""Different chat_ids should maintain separate message histories."""
0 commit comments