mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Revert "Get HtmlReader to work again"
This reverts commit 39db9ddcfd.
Conflicts:
tests/test_readers.py
This commit is contained in:
parent
4349a5e815
commit
84c708b74b
7 changed files with 15 additions and 72 deletions
|
|
@ -1,13 +0,0 @@
|
|||
<!-- title: A great html article with metadata -->
|
||||
<!-- tags: foo, bar, foobar -->
|
||||
<!-- date: 2010-12-02 10:14 -->
|
||||
<!-- category: yeah -->
|
||||
<!-- author: Alexis Métaireau -->
|
||||
<!-- summary:
|
||||
Multi-line metadata should be supported
|
||||
as well as <strong>inline markup</strong>.
|
||||
-->
|
||||
<!-- custom_field: http://notmyidea.org -->
|
||||
|
||||
<h1>This is an article in html with metadata</h1>
|
||||
<p>It features very interesting insights.</p>
|
||||
|
|
@ -74,8 +74,7 @@ class TestArticlesGenerator(unittest.TestCase):
|
|||
[u'This is an article with category !', 'published', 'yeah', 'article'],
|
||||
[u'This is an article without category !', 'published', 'Default', 'article'],
|
||||
[u'This is an article without category !', 'published', 'TestCategory', 'article'],
|
||||
[u'This is a super article !', 'published', 'yeah', 'article'],
|
||||
[u'A great html article with metadata', 'published', u'yeah', 'article']
|
||||
[u'This is a super article !', 'published', 'yeah', 'article']
|
||||
]
|
||||
self.assertItemsEqual(articles_expected, articles)
|
||||
|
||||
|
|
|
|||
|
|
@ -109,24 +109,3 @@ class MdReaderTest(unittest.TestCase):
|
|||
'<h3 id="level2">Level2</h3>'
|
||||
|
||||
self.assertEqual(content, expected)
|
||||
|
||||
|
||||
class HtmlReaderTest(unittest.TestCase):
|
||||
|
||||
def test_article_with_metadata(self):
|
||||
reader = readers.HtmlReader({})
|
||||
content, metadata = reader.read(_filename('article_with_html_metadata.html'))
|
||||
expected = {
|
||||
'category': 'yeah',
|
||||
'author': u'Alexis Métaireau',
|
||||
'title': 'A great html article with metadata',
|
||||
'summary': u'Multi-line metadata should be'\
|
||||
u' supported\nas well as <strong>inline'\
|
||||
u' markup</strong>.',
|
||||
'date': datetime.datetime(2010, 12, 2, 10, 14),
|
||||
'tags': ['foo', 'bar', 'foobar'],
|
||||
'custom_field': 'http://notmyidea.org',
|
||||
}
|
||||
|
||||
for key, value in expected.items():
|
||||
self.assertEquals(value, metadata[key], key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue