@@ -0,0 +1,817 @@
+from django.test import TestCase%0A%0Afrom ..frontmatter import split%0A%0A%0Atemplate = '''%0A---%0Akey: value%0Afoo:%0A  - bar%0A  - baz%0A---%0ABody content%0A'''%0A%0Atemplate_invalid = '''%0A---%0A- this%0Ais%0A- invalid%0A---%0A'''%0A%0Atemplate_missing_frontmatter = '''%0ANothing here%0A'''%0A%0A%0Aclass FrontmatterTestCase(TestCase):%0A%0A    def test_success(self):%0A        data, body = split(template)%0A        self.assertEquals(data, %7B%0A            'key': 'value',%0A            'foo': %5B'bar', 'baz'%5D,%0A        %7D)%0A        self.assertEquals(body, 'Body content%5Cn')%0A%0A    def test_invalid_yaml(self):%0A        with self.assertRaisesRegex(ValueError, 'Invalid yaml'):%0A            split(template_invalid)%0A%0A    def test_missing_frontmatter(self):%0A        with self.assertRaisesRegex(ValueError, 'Invalid front matter content'):%0A            split(template_missing_frontmatter)%0A

Add test_frontmatter.py