Exemplo n.º 1
0
def _article(fullname, tags, content):
    info = ArticleInfo()
    info.fullname = fullname
    info.tags = tags
    article = Article()
    article.info = info
    article.content = content
    return article
Exemplo n.º 2
0
 def test_raises_error_when_fetching_non_existent_info(self):
     info = ArticleInfo()
     info.fullname = 'cooking/vindaloo'
     self.assertRaises(ArticleNotFoundError,
                       self.store.fetch_article_by_info,
                       info)
Exemplo n.º 3
0
 def test_fetch_article_by_info(self):
     info = ArticleInfo()
     info.fullname = 'cooking/madras'
     article = self.store.fetch_article_by_info(info)
     self.assertEquals(info.fullname, article.info.fullname)