Create TestAgentLogging

- create class to execute modular unittests 
- def setup for modular setup 
- objective to keep setup minimal , so that tests aren't bloated and fast to run
- Since most param have a set default , init of necessary condition is a valid and supportive op wrt test speed .
pull/615/head
Sambhav Dixit 2 months ago committed by GitHub
parent 92912b0397
commit ef58dd4582
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,3 +5,20 @@ from datetime import datetime
import unittest
from swarms.schemas.agent_step_schemas import ManySteps, Step
from swarms.structs.agent import Agent
class TestAgentLogging(unittest.TestCase):
def setUp(self):
self.mock_tokenizer = MagicMock()
self.mock_tokenizer.count_tokens.return_value = 100
self.mock_short_memory = MagicMock()
self.mock_short_memory.get_memory_stats.return_value = {"message_count": 2}
self.mock_long_memory = MagicMock()
self.mock_long_memory.get_memory_stats.return_value = {"item_count": 5}
self.agent = Agent(
tokenizer=self.mock_tokenizer,
short_memory=self.mock_short_memory,
long_term_memory=self.mock_long_memory
)

Loading…
Cancel
Save