mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Remove duplicate tags and authors in metadata
This commit is contained in:
parent
ad72287b4c
commit
7f795ed558
4 changed files with 31 additions and 1 deletions
|
|
@ -516,6 +516,16 @@ class MdReaderTest(ReaderTest):
|
|||
}
|
||||
self.assertDictHasSubset(page.metadata, expected)
|
||||
|
||||
def test_duplicate_tags_or_authors_are_removed(self):
|
||||
reader = readers.MarkdownReader(settings=get_settings())
|
||||
content, metadata = reader.read(
|
||||
_path('article_with_duplicate_tags_authors.md'))
|
||||
expected = {
|
||||
'tags': ['foo', 'bar', 'foobar'],
|
||||
'authors': ['Author, First', 'Author, Second'],
|
||||
}
|
||||
self.assertDictHasSubset(metadata, expected)
|
||||
|
||||
|
||||
class HTMLReaderTest(ReaderTest):
|
||||
def test_article_with_comments(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue