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'
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'
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'