def test_set_window_visible(): parent = MagicMock() plugin = Plugin(parent) window = MagicMock() action = MagicMock() plugin._show_window = {window: action} plugin.setWindowVisible(True) action.setVisible.assert_called_once_with(True)
def test_close(): parent = MagicMock() plugin = Plugin(parent) window = MagicMock() action = MagicMock() plugin._show_window = {window: action} plugin.close() parent.action_group_windows.removeAction.assert_called_once_with(action) assert len(plugin.windows) == 0 assert len(plugin._show_window.keys()) == 0