mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
settings: Make DEFAULT_CONFIG public
This dictionary is accessed by plugins (like `summary`) which add new settings, so it should be public (i.e. no prefixed underscore). The changed name length would have led to a re-indenting of the default contents anyway, so I shifted them all to four spaces.
This commit is contained in:
parent
c6de4430a0
commit
e9dc1dd478
6 changed files with 105 additions and 108 deletions
|
|
@ -11,7 +11,7 @@ from shutil import rmtree
|
|||
from pelican.generators import (ArticlesGenerator, PagesGenerator,
|
||||
TemplatePagesGenerator)
|
||||
from pelican.writers import Writer
|
||||
from pelican.settings import _DEFAULT_CONFIG
|
||||
from pelican.settings import DEFAULT_CONFIG
|
||||
from pelican.tests.support import unittest, get_settings
|
||||
|
||||
CUR_DIR = os.path.dirname(__file__)
|
||||
|
|
@ -117,15 +117,15 @@ class TestArticlesGenerator(unittest.TestCase):
|
|||
|
||||
def test_do_not_use_folder_as_category(self):
|
||||
|
||||
settings = _DEFAULT_CONFIG.copy()
|
||||
settings = DEFAULT_CONFIG.copy()
|
||||
settings['ARTICLE_DIR'] = 'content'
|
||||
settings['DEFAULT_CATEGORY'] = 'Default'
|
||||
settings['DEFAULT_DATE'] = (1970, 1, 1)
|
||||
settings['USE_FOLDER_AS_CATEGORY'] = False
|
||||
settings['filenames'] = {}
|
||||
generator = ArticlesGenerator(settings.copy(), settings,
|
||||
CUR_DIR, _DEFAULT_CONFIG['THEME'], None,
|
||||
_DEFAULT_CONFIG['MARKUP'])
|
||||
generator = ArticlesGenerator(
|
||||
settings.copy(), settings, CUR_DIR, DEFAULT_CONFIG['THEME'], None,
|
||||
DEFAULT_CONFIG['MARKUP'])
|
||||
generator.generate_context()
|
||||
# test for name
|
||||
# categories are grouped by slug; if two categories have the same slug
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue