From 3de422b1ab15cccce8e3b17e50bb31c137e9101c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles=20Fl=C3=A8che?= Date: Fri, 9 Feb 2018 10:43:23 +0100 Subject: [PATCH] Add test for parsed metadata --- pelican/tests/test_contents.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py index d028c7a1a..edd91fb67 100644 --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -319,17 +319,21 @@ def test_intrasite_link(self): ) # also test for summary in metadata - args['metadata']['summary'] = ( + parsed = ( 'A simple summary test, with a ' 'link' ) - args['context']['localsiteurl'] = 'http://notmyidea.org' - p = Page(**args) - self.assertEqual( - p.summary, + linked = ( 'A simple summary test, with a ' 'link' ) + args['settings']['FORMATTED_FIELDS'] = ['summary', 'custom'] + args['metadata']['summary'] = parsed + args['metadata']['custom'] = parsed + args['context']['localsiteurl'] = 'http://notmyidea.org' + p = Page(**args) + self.assertEqual(p.summary, linked) + self.assertEqual(p.custom, linked) def test_intrasite_link_more(self): # type does not take unicode in PY2 and bytes in PY3, which in