Пример #1
0
 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
Пример #3
0
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')]
Пример #4
0
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 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
Пример #6
0
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')
        ]
Пример #7
0
def setUp():
    setup_basic_test()
    setup_global_objects()
    h.set_context('test', neighborhood='Projects')
    c.project.install_app('blog', 'blog')
    g.set_app('blog')
Пример #8
0
def setup_with_tools():
    setup_global_objects()
    g.set_app('bugs')
def setup_with_tools():
    setup_global_objects()
    g.set_app('bugs')
Пример #10
0
def setup_with_tools():
    setup_global_objects()
    g.set_app('wiki')
Пример #11
0
def setup_with_tools():
    setup_global_objects()
    g.set_app('wiki')
Пример #12
0
def setUp():
    setup_basic_test()
    setup_global_objects()
    h.set_context('test', neighborhood='Projects')
    c.project.install_app('blog', 'blog')
    g.set_app('blog')