diff --git a/dragonfly/os_dependent_mock.py b/dragonfly/os_dependent_mock.py index 8e146709..828f898f 100755 --- a/dragonfly/os_dependent_mock.py +++ b/dragonfly/os_dependent_mock.py @@ -20,26 +20,32 @@ Heavily modified to allow more dragonfly functionality to work regardless of operating system. """ + from .actions import ActionBase, DynStrActionBase -# Mock ActionBase and DynStrActionBase classes +class MockBase(object): + def __init__(self, *args, **kwargs): + pass + -def mock_action(*args, **kwargs): - return ActionBase() +class MockAction(ActionBase): + """ Mock class for dragonfly actions. """ + def __init__(self, *args, **kwargs): + ActionBase.__init__(self) -def mock_dyn_str_action(*args, **kwargs): - return DynStrActionBase(*args, **kwargs) +class Mouse(DynStrActionBase): + """ Mock Mouse action class. """ + def __init__(self, spec=None, static=False): + DynStrActionBase.__init__(self, spec, static) -Paste = mock_dyn_str_action -Mouse = mock_dyn_str_action -WaitWindow = mock_action -FocusWindow = mock_action -StartApp = mock_action -BringApp = mock_action -PlaySound = mock_action +WaitWindow = MockAction +FocusWindow = MockAction +StartApp = MockAction +BringApp = MockAction +PlaySound = MockAction class _WindowInfo(object): @@ -54,11 +60,6 @@ def get_foreground(): return _WindowInfo -class MockBase(object): - def __init__(self, *args, **kwargs): - pass - - class HardwareInput(MockBase): pass