def test_getlistoftags(self): test = Wiki("test1") test.title = "tes1t" test.tags = "test" test.url = "test1" taglist = ["test1"] self.assertEqual(taglist, related(test.url))
def get_wiki(): wiki = getattr(g, '_wiki', None) if wiki is None: wiki = g._wiki = Wiki(current_app.config['CONTENT_DIR']) return wiki
def wiki(self): if not self._wiki: self._wiki = Wiki(self.rootdir) return self._wiki