mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Start working on the testsuite.
This commit is contained in:
parent
5af56793eb
commit
bb96e253c9
2 changed files with 70 additions and 0 deletions
16
pelican/tests/test_settings.py
Normal file
16
pelican/tests/test_settings.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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'
|
||||
Loading…
Add table
Add a link
Reference in a new issue