diff tests/test_appconfig.py @ 675:3df808b133f8

internal: Improve how theme configuration is validated and merged. * Add default theme config up-front so it benefits from the usual validation. * Add an explicit `use_default_theme_content` setting. * Add/fix unit tests.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 06 Mar 2016 23:49:41 -0800
parents 25df894f9ab9
children 894d286b348f
line wrap: on
line diff
--- a/tests/test_appconfig.py	Sun Mar 06 23:48:01 2016 -0800
+++ b/tests/test_appconfig.py	Sun Mar 06 23:49:41 2016 -0800
@@ -5,13 +5,13 @@
     values = {}
     config = PieCrustConfiguration(values=values)
     assert config.get('site/root') == '/'
-    assert len(config.get('site/sources')) == 3  # pages, posts, theme_pages
+    assert len(config.get('site/sources')) == 2  # pages, posts
 
 
 def test_config_default2():
     config = PieCrustConfiguration()
     assert config.get('site/root') == '/'
-    assert len(config.get('site/sources')) == 3  # pages, posts, theme_pages
+    assert len(config.get('site/sources')) == 2  # pages, posts
 
 
 def test_config_site_override_title():
@@ -29,7 +29,7 @@
     config = PieCrustConfiguration(values=values)
     # The order of routes is important. Sources, not so much.
     assert list(map(lambda v: v['source'], config.get('site/routes'))) == [
-            'notes', 'posts', 'posts', 'posts', 'pages', 'theme_pages']
+            'notes', 'posts', 'posts', 'posts', 'pages']
     assert list(config.get('site/sources').keys()) == [
-            'pages', 'posts', 'notes', 'theme_pages']
+            'pages', 'posts', 'notes']