2014-05-05 08:49:29 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import (absolute_import, division, print_function,
|
|
|
|
unicode_literals)
|
|
|
|
|
2013-01-23 21:43:30 +00:00
|
|
|
from rq.compat import is_python_version
|
2014-05-05 08:49:29 +00:00
|
|
|
from rq.scripts import read_config_file
|
|
|
|
|
2013-01-23 21:43:30 +00:00
|
|
|
if is_python_version((2, 7), (3, 2)):
|
|
|
|
from unittest import TestCase
|
|
|
|
else:
|
|
|
|
from unittest2 import TestCase # noqa
|
2012-11-24 13:53:22 +00:00
|
|
|
|
2013-01-23 21:43:30 +00:00
|
|
|
|
2012-11-24 13:53:22 +00:00
|
|
|
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")
|