Added tests for config file loading

This commit is contained in:
Ulrich Petri 2012-11-24 14:53:22 +01:00
parent ba57f104ff
commit 43038d3150
2 changed files with 9 additions and 0 deletions

1
tests/dummy_settings.py Normal file
View File

@ -0,0 +1 @@
REDIS_HOST = "testhost.example.com"

8
tests/test_scripts.py Normal file
View File

@ -0,0 +1,8 @@
from unittest import TestCase
from rq.scripts import read_config_file
class TestScripts(TestCase):
def test_config_file(self):
settings = read_config_file("tests.dummy_settings")
self.assertIn("REDIS_HOST", settings)
self.assertEqual(settings['REDIS_HOST'], "testhost.example.com")