1
0
Fork 0
forked from github/pelican

control pagination per template

This commit is contained in:
Oliver Urs Lenz 2018-07-12 13:41:05 +02:00
commit 62128fb948
8 changed files with 84 additions and 41 deletions

View file

@ -177,6 +177,15 @@ class TestSettingsConfiguration(unittest.TestCase):
['/foo/bar', '/ha'])
self.assertNotIn('EXTRA_TEMPLATES_PATHS', settings)
def test_deprecated_paginated_direct_templates(self):
settings = self.settings
settings['PAGINATED_DIRECT_TEMPLATES'] = ['index', 'archives']
settings['PAGINATED_TEMPLATES'] = {'index': 10, 'category': None}
settings = configure_settings(settings)
self.assertEqual(settings['PAGINATED_TEMPLATES'],
{'index': 10, 'category': None, 'archives': None})
self.assertNotIn('PAGINATED_DIRECT_TEMPLATES', settings)
def test_theme_and_extra_templates_exception(self):
settings = self.settings
settings['EXTRA_TEMPLATES_PATHS'] = ['/ha']