MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / mockSession

Function mockSession

internal/sessions/transfer_test.go:258–268  ·  view source on GitHub ↗

mockSession builds a Session with tools pre-populated for testing.

(userAgent string, tools []observedtools.ObservedTool)

Source from the content-addressed store, hash-verified

256
257// mockSession builds a Session with tools pre-populated for testing.
258func mockSession(userAgent string, tools []observedtools.ObservedTool) *Session {
259 s := &Session{
260 ID: "test-session",
261 UserAgent: userAgent,
262 Tools: tools,
263 subscribers: make(map[string]chan *CommandResult),
264 observers: make(map[string]chan *ObserveEvent),
265 }
266 s.Agent = detectAgent(tools)
267 return s
268}
269
270// ===================================================================
271// A. Binary Detection Tests

Callers 15

TestPickShellTool_ClineFunction · 0.85
TestPickShellTool_CursorFunction · 0.85
TestPickReadTool_CursorFunction · 0.85
TestPickWriteTool_ClineFunction · 0.85
TestPickWriteTool_CursorFunction · 0.85

Calls 1

detectAgentFunction · 0.85

Tested by

no test coverage detected