From 8195677cae913e2f964bf631d88f00a33e16bc24 Mon Sep 17 00:00:00 2001 From: Sunaina Pai Date: Sat, 11 Aug 2018 14:40:18 +0530 Subject: Populate placeholders in content when specified Placeholders in content files are not populated by default. If placeholders are to be populated in content files, parameter named `render` with a string value of `yes` must be specified. This `render` parameter may be specified as a header in content files or it may be specified as a keyword argument in `make_pages` call. --- test/test_content.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'test/test_content.py') diff --git a/test/test_content.py b/test/test_content.py index 06ec97d..66342d9 100644 --- a/test/test_content.py +++ b/test/test_content.py @@ -11,7 +11,6 @@ class ContentTest(unittest.TestCase): self.blog_path = path.temppath('blog') self.undated_path = os.path.join(self.blog_path, 'foo.txt') self.dated_path = os.path.join(self.blog_path, '2018-01-01-foo.txt') - self.long_post_path = os.path.join(self.blog_path, 'bar.txt') self.normal_post_path = os.path.join(self.blog_path, 'baz.txt') self.md_post_path = os.path.join(self.blog_path, 'qux.md') self.no_md_post_path = os.path.join(self.blog_path, 'qux.txt') @@ -24,10 +23,6 @@ class ContentTest(unittest.TestCase): with open(self.dated_path, 'w') as f: f.write('hello world') - with open(self.long_post_path, 'w') as f: - self.long_text = ' \n'.join('word' + str(i) for i in range(50)) - f.write(self.long_text) - with open(self.normal_post_path, 'w') as f: f.write('\n\nFoo') @@ -45,13 +40,8 @@ class ContentTest(unittest.TestCase): self.mock_args = args def test_content_content(self): - content = makesite.read_content(self.long_post_path) - self.assertEqual(content['content'], self.long_text) - - def test_content_summary(self): - content = makesite.read_content(self.long_post_path) - expected_text = ' '.join('word' + str(i) for i in range(25)) - self.assertEqual(content['summary'], expected_text) + content = makesite.read_content(self.undated_path) + self.assertEqual(content['content'], 'hello world') def test_content_date(self): content = makesite.read_content(self.dated_path) -- cgit v1.2.3