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

Method test_machine_property

tests/tools/test_models.py:554–576  ·  view source on GitHub ↗

Test machine property.

(self)

Source from the content-addressed store, hash-verified

552 assert tcr2.attempts == 3
553
554 def test_machine_property(self):
555 """Test machine property."""
556 # No chuk_result
557 tcr1 = ToolCallResult(tool_name="t", success=True)
558 assert tcr1.machine is None
559
560 # With machine
561 class MockChukMachine:
562 machine = "server1.local"
563
564 tcr2 = ToolCallResult(
565 tool_name="t", success=True, chuk_result=MockChukMachine()
566 )
567 assert tcr2.machine == "server1.local"
568
569 # With None machine
570 class MockChukNullMachine:
571 machine = None
572
573 tcr3 = ToolCallResult(
574 tool_name="t", success=True, chuk_result=MockChukNullMachine()
575 )
576 assert tcr3.machine is None
577
578 def test_extract_mcp_text_content(self):
579 """Test _extract_mcp_text_content method."""

Callers

nothing calls this directly

Calls 3

ToolCallResultClass · 0.90
MockChukMachineClass · 0.85
MockChukNullMachineClass · 0.85

Tested by

no test coverage detected