Skip to content

Commit

Permalink
fix: correct Session initialization in test base class
Browse files Browse the repository at this point in the history
Co-Authored-By: Alex Reibman <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and areibman committed Dec 19, 2024
1 parent 0bf814d commit dc4976d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import asyncio
import json
from unittest.mock import AsyncMock, MagicMock
from uuid import uuid4

from agentops.session import Session
from agentops.client import Client
Expand All @@ -15,7 +16,10 @@ async def async_setup_method(self, method):
"""Set up test method."""
# Initialize mock client and session
self.mock_req = AsyncMock()
self.session = Session(client=Client(api_key="test-key"))
client = Client()
client.configure(api_key="test-key")
config = client._config
self.session = Session(session_id=uuid4(), config=config)
self.session.client.http_client = self.mock_req

async def teardown_method(self, method):
Expand Down

0 comments on commit dc4976d

Please sign in to comment.