def test_ToolBar_on_refresh_clicked():
    """
    When refresh is clicked, the refresh logic from the controller is stated.
    """
    tb = ToolBar(None)
    tb.controller = mock.MagicMock()
    tb.on_refresh_clicked()
    tb.controller.sync_api.assert_called_once_with()
def test_ToolBar_on_logout_clicked():
    """
    When logout is clicked, the logout logic from the controller is started.
    """
    tb = ToolBar(None)
    tb.controller = mock.MagicMock()
    tb.on_logout_clicked()
    tb.controller.logout.assert_called_once_with()