MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / test_agent_messaging

Function test_agent_messaging

tests/rust_unit_tests/agent_tests.rs:117–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115#[tokio::test]
116#[ignore = "Requires OpenAI API key (set OPENAI_API_KEY environment variable to run)"]
117async fn test_agent_messaging() {
118 let agent = create_test_agent().await;
119
120 let message = AgentMessage::new(
121 AgentId::new(),
122 None,
123 MessageContent::Text("Hello agent".to_string()),
124 );
125 let mut context = WorkflowContext::new(WorkflowId::new());
126 let response = agent.process_message(message, &mut context).await;
127 assert!(response.is_ok());
128}
129
130#[tokio::test]
131#[ignore = "Requires OpenAI API key (set OPENAI_API_KEY environment variable to run)"]

Callers

nothing calls this directly

Calls 3

create_test_agentFunction · 0.85
to_stringMethod · 0.80
process_messageMethod · 0.45

Tested by

no test coverage detected