Пример #1
0
def test_bring_all_to_front():
    parent = MagicMock()
    plugin = Plugin(parent)
    window = MagicMock()
    plugin.windows = [window]

    plugin.bringAllToFront()
    window.showNormal.assert_called_once()
Пример #2
0
def test_show_window():
    parent = MagicMock()
    plugin = Plugin(parent)
    window = MagicMock()
    plugin.windows = [window]

    plugin.showWindow()
    window.show.assert_called_once()
Пример #3
0
def test_minimize():
    parent = MagicMock()
    plugin = Plugin(parent)
    window = MagicMock()
    plugin.windows = [window]

    plugin.minimize()
    window.showMinimized.assert_called_once()