コード例 #1
0
def test_logout():
    """
    Ensure the toolbar updates to the logged out state.
    """
    w = Window()
    w.tool_bar = mock.MagicMock()
    w.logout()
    w.tool_bar.set_logged_out.assert_called_once_with()
コード例 #2
0
def test_logout(mocker):
    """
    Ensure the left pane updates to the logged out state.
    """
    w = Window()
    w.left_pane = mocker.MagicMock()
    w.top_pane = mocker.MagicMock()

    w.logout()

    w.left_pane.set_logged_out.assert_called_once_with()
    w.top_pane.set_logged_out.assert_called_once_with()