Ejemplo n.º 1
0
 def test_post_with_wrong_format(self):
     post = Post.from_text(self.sample_path, SAMPLE_POST_WITH_WRONG_FORMAT, self.config,)
     self.assertIsNone(post)
Ejemplo n.º 2
0
 def test_url_with_different_permalink(self):
     self.config.permalink = "blog/:category/:year/:month/:day/:title"
     post = Post.from_text(self.sample_path, SAMPLE_POST, self.config)
     self.assertEqual(post.url, "blog/sample/2010/01/01/a-sample-post/")
Ejemplo n.º 3
0
 def setUp(self):
     self.config = FakeConfig()
     Post.config = self.config
     self.sample_path = 'source/posts/sample.md'
     self.post = Post.from_text(self.sample_path, SAMPLE_POST, self.config)