예제 #1
0
 def test_should_generate_legacy_yaml_frontmatter(self, pypandocMock,
                                                  blogObjClass):
     item = MainTests.posts["items"][0]
     fm = getFrontMatter(item, "markdown", legacy=True, bare=True)
     fmObj = yaml.load(fm)
     assert fmObj["Title"] == 'title'
     assert fmObj["PostId"] == '100'
예제 #2
0
 def test_should_generate_toml_frontmatter_for_asciidoc(
         self, pypandocMock, blogObjClass):
     item = MainTests.posts["items"][0]
     fm = getFrontMatter(item, "asciidoc", legacy=False, bare=True)
     fmObj = toml.loads(fm)
     assert fmObj["title"] == 'title'
     assert fmObj["id"] == '100'
     assert fmObj["aliases"][0] == 'url'
예제 #3
0
 def test_should_generate_toml_frontmatter(self, pypandocMock,
                                           blogObjClass):
     item = MainTests.posts["items"][0]
     fm = getFrontMatter(item)
     fmObj = toml.loads(fm)
     assert fmObj["title"] == 'title'
     assert fmObj["id"] == '100'
     assert fmObj["aliases"][0] == 'url'