Exemple #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()
Exemple #2
0
def test_set_logged_in_as():
    """
    Given a username, the toolbar is appropriately called to update.
    """
    w = Window()
    w.tool_bar = mock.MagicMock()
    w.set_logged_in_as('test')
    w.tool_bar.set_logged_in_as.assert_called_once_with('test')