1
0
Fork 0
forked from github/pelican

Tests for settings.

This commit is contained in:
Alexis Metaireau 2011-01-13 00:46:10 +01:00
commit 8454b0d1b8
5 changed files with 67 additions and 45 deletions

View file

@ -1,16 +0,0 @@
from unittest2 import TestCase
from pelican.settings import read_settings, DEFAULT_CONFIG
class SettingsTest(TestCase):
def test_read_settings(self):
# providing no file should return the default values
settings = read_settings(None)
self.assertDictEqual(settings, DEFAULT_CONFIG)
# providing a file should read it, replace the default values and append
# new values to the settings, if any
settings = read_settings(mock)
self.assertIn('key', settings)
self.assertEqual(settings['KEY'