moved settings

This commit is contained in:
Jiri Barton 2010-08-25 15:08:07 +02:00
parent 344ae771a8
commit 392898c6a5
3 changed files with 13 additions and 15 deletions

View file

@ -2,4 +2,7 @@
syntax: regexp
^\.project$
syntax: regexp
^\.pydevproject$
^\.pydevproject$
syntax: glob
*.pyc
*.egg-info

View file

@ -4,11 +4,16 @@ DATABASES = {
}
}
CONSTANCE_CONNECTION_CLASS = 'tests.redis_mockup.Connection'
INSTALLED_APPS = (
'tests',
'constance',
)
CONSTANCE_CONNECTION_CLASS = 'tests.redis_mockup.Connection'
CONSTANCE_CONFIG = {
'INT_VALUE': (1, 'some int'),
'BOOL_VALUE': (True, 'true or false'),
'STRING_VALUE': ('Hello world', 'greetings'),
}

View file

@ -7,13 +7,7 @@ from constance import config
class TestStorage(TestCase):
def setUp(self):
self.old_config = getattr(settings, 'CONSTANCE_CONFIG', None)
settings.CONSTANCE_CONFIG = {
'INT_VALUE': (1, 'some int'),
'BOOL_VALUE': (True, 'true or false'),
'STRING_VALUE': ('Hello world', 'greetings'),
}
def tearDown(self):
config._rd.clear()
def test_store(self):
@ -43,7 +37,3 @@ class TestStorage(TestCase):
except Exception, e:
pass
self.assertEquals(type(e), AttributeError)
def tearDown(self):
if self.old_config:
settings.CONSTANCE_CONFIG = self.old_config