def queryRoot(wfile, req, sort): wlib = store.getWeblib() # category pane categoryList = _buildCategoryList(wlib) # upgrade_info upgrade_info = upgrade_checker.pollUpgradeInfo() # webitem pane webItems = map(WebItemNode, query_wlib.queryRoot(wlib)) renderer = WeblibRenderer(wfile) if sort: renderer.cookie['weblib_sort'] = sort renderer.setLayoutParam(None) renderer.output( '/weblib', wlib.tags, None, wlib.getDefaultTag(), categoryList, upgrade_info, sort, webItems, )
def queryRoot(wfile, req): wlib = store.getWeblib() # category pane categoryList = _buildCategoryList(wlib) # webitem pane webItems = map(WebItemNode, query_wlib.queryRoot(wlib)) renderer = WeblibRenderer(wfile) renderer.setLayoutParam(None) renderer.output( wlib.tags, None, wlib.getDefaultTag(), categoryList, webItems)
def test_queryRoot(self): wlib = self.store.wlib result = query_wlib.queryRoot(wlib) self.assertEqual(result, []) # nothing match no tag