mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
Merge remote-tracking branch 'origin/master' into fix_agents
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from autogpt import commands
|
||||
import autogpt.agent.agent_manager as agent_manager
|
||||
from autogpt.app import start_agent, list_agents
|
||||
import unittest
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
@@ -9,9 +10,9 @@ class TestCommands(unittest.TestCase):
|
||||
obj = MagicMock()
|
||||
obj.response.choices[0].messages[0].content = "Test message"
|
||||
mock.return_value = obj
|
||||
commands.start_agent("Test Agent", "chat", "Hello, how are you?", "gpt2")
|
||||
agents = commands.list_agents()
|
||||
start_agent("Test Agent", "chat", "Hello, how are you?", "gpt2")
|
||||
agents = list_agents()
|
||||
self.assertEqual("List of agents:\n0: chat", agents)
|
||||
commands.start_agent("Test Agent 2", "write", "Hello, how are you?", "gpt2")
|
||||
agents = commands.list_agents()
|
||||
start_agent("Test Agent 2", "write", "Hello, how are you?", "gpt2")
|
||||
agents = list_agents()
|
||||
self.assertEqual("List of agents:\n0: chat\n1: write", agents)
|
||||
|
||||
Reference in New Issue
Block a user