MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / agentops_client

Function agentops_client

tests/integration/conftest.py:24–39  ·  view source on GitHub ↗

Fixture to provide an initialized AgentOps client.

(mock_api_key, monkeypatch)

Source from the content-addressed store, hash-verified

22
23@pytest.fixture
24def agentops_client(mock_api_key, monkeypatch):
25 """Fixture to provide an initialized AgentOps client."""
26 # Create a mock auth response
27 mock_auth = MagicMock()
28 mock_auth.authenticate = lambda x: True
29 mock_auth.is_authenticated = True
30
31 # Create the client
32 client = Client()
33
34 # Mock the auth module
35 monkeypatch.setattr(client, "api", MagicMock(auth=mock_auth))
36
37 # Initialize with mock key
38 client.init(api_key=mock_api_key)
39 return client
40
41
42@pytest.fixture

Callers

nothing calls this directly

Calls 2

initMethod · 0.95
ClientClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…