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:
W. Trevor King 2013-03-24 08:38:19 -04:00
commit e9dc1dd478
6 changed files with 105 additions and 108 deletions

View file

@ -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