MCPcopy Create free account
hub / github.com/IBM/mcp-cli / _make_message_obj

Function _make_message_obj

tests/commands/export/test_export_command.py:31–35  ·  view source on GitHub ↗

A message object that has a to_dict() method.

(role: str = "user", content: str = "hello")

Source from the content-addressed store, hash-verified

29
30
31def _make_message_obj(role: str = "user", content: str = "hello") -> MagicMock:
32 """A message object that has a to_dict() method."""
33 m = MagicMock()
34 m.to_dict.return_value = {"role": role, "content": content}
35 return m
36
37
38def _make_tracker(

Calls

no outgoing calls

Tested by

no test coverage detected