Exemplo n.º 1
0
    def test_good_yaml_md(self):
        file_path = 'jagss/tests/good_yaml_md.md'
        good_dict = {'title': 'Test File',
                     'url': '/tests/good_yaml_md.html',
                     'relativePath': '/tests',
                     'html': """<h1>This is a test file!</h1>

<p>This exists to test the base functionality of Jagss.</p>
""",
                     'template': 'base.html',
                     'type': 'yaml+markdown'}
        test_dict = jagss.dictFromMarkdown(file_path, '/tests')
        self.assertEqual(good_dict, test_dict)
Exemplo n.º 2
0
    def test_good_md(self):
        file_path = 'jagss/tests/good_md.md'
        good_dict = {'url': '/tests/good_md.html',
                     'relativePath': '/tests',
                     'html': """<h1>This is an h1</h1>

<h2>This is an h2</h2>

<p>this is <a href="\'https://rpy.xyz\'">a link</a>.</p>

<p>This is a second paragraph.</p>
""",
                     'type': 'markdown'}
        test_dict = jagss.dictFromMarkdown(file_path, '/tests')
        self.assertEqual(good_dict, test_dict)