예제 #1
0
파일: test_post.py 프로젝트: dinever/crotal
 def test_post_with_wrong_format(self):
     post = Post.from_text(self.sample_path, SAMPLE_POST_WITH_WRONG_FORMAT, self.config,)
     self.assertIsNone(post)
예제 #2
0
파일: test_post.py 프로젝트: dinever/crotal
 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/")
예제 #3
0
파일: test_post.py 프로젝트: dinever/crotal
 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)