MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / MockCommand

Class MockCommand

tests/test_undo_ui_integration.py:27–42  ·  view source on GitHub ↗

Mock command for testing.

Source from the content-addressed store, hash-verified

25 QT_AVAILABLE = True
26
27 class MockCommand(CommandBase):
28 """Mock command for testing."""
29
30 def __init__(self, description: str):
31 super().__init__(description)
32 self.timestamp = datetime.now()
33 self.execute_called = False
34 self.undo_called = False
35
36 def execute(self) -> bool:
37 self.execute_called = True
38 return True
39
40 def undo(self) -> bool:
41 self.undo_called = True
42 return True
43
44except ImportError:
45 QT_AVAILABLE = False

Callers 3

setUpMethod · 0.70
setUpMethod · 0.70

Calls

no outgoing calls

Tested by 3

setUpMethod · 0.56
setUpMethod · 0.56