def setup_with_tools(self): setup_global_objects() g.set_app('wiki') _clear_subscriptions() _clear_notifications() ThreadLocalORMSession.flush_all() ThreadLocalORMSession.close_all() self.pg = WM.Page.query.get(app_config_id=c.app.config._id) M.notification.MAILBOX_QUIESCENT = None # disable message combining
def setup_with_tools(self): setup_global_objects() g.set_app('wiki') _clear_subscriptions() _clear_notifications() ThreadLocalORMSession.flush_all() ThreadLocalORMSession.close_all() self.pg = WM.Page.query.get(app_config_id=c.app.config._id) M.notification.MAILBOX_QUIESCENT=None # disable message combining
def set_nav(neighborhood): project = neighborhood.neighborhood_project if project: c.project = project g.set_app('admin') else: admin_url = neighborhood.url() + '_admin/' c.custom_sidebar_menu = [ SitemapEntry('Overview', admin_url + 'overview'), SitemapEntry('Awards', admin_url + 'accolades')]
def test_limit_tools_macro(): g.set_app('wiki') p_nbhd = M.Neighborhood.query.get(name='Adobe') with h.push_context(p_nbhd.neighborhood_project._id): r = g.markdown_wiki.convert('[[projects]]') assert '<span>Admin</span>' in r r = g.markdown_wiki.convert('[[projects grid_view_tools=wiki]]') assert '<span>Admin</span>' not in r r = g.markdown_wiki.convert('[[projects grid_view_tools=wiki,admin]]') assert '<span>Admin</span>' in r
def set_nav(neighborhood): project = neighborhood.neighborhood_project if project: c.project = project g.set_app('admin') else: admin_url = neighborhood.url() + '_admin/' c.custom_sidebar_menu = [ SitemapEntry('Overview', admin_url + 'overview'), SitemapEntry('Awards', admin_url + 'accolades') ]
def setUp(): setup_basic_test() setup_global_objects() h.set_context('test', neighborhood='Projects') c.project.install_app('blog', 'blog') g.set_app('blog')
def setup_with_tools(): setup_global_objects() g.set_app('bugs')
def setup_with_tools(): setup_global_objects() g.set_app('wiki')