Unittests now use the sample configuration file.

Fixes #30
This commit is contained in:
Fabien Boucher
2013-04-22 11:45:48 +02:00
parent 95b1dece69
commit 7f62a47da9
2 changed files with 4 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ import os
CONFIG = None
curdir = os.path.abspath(os.path.dirname(__file__))
INIFILE = os.path.abspath(os.path.join(curdir, '..', 'etc', "config.ini"))
SAMPLE_INIFILE = os.path.abspath(os.path.join(curdir, '..',
'etc', "config.ini-sample"))
class ConfigurationError(Exception):

View File

@@ -22,6 +22,7 @@ import unittest2
import mox
import stubout
from swsync import utils
class TestCase(unittest2.TestCase):
@@ -30,6 +31,7 @@ class TestCase(unittest2.TestCase):
super(TestCase, self).setUp()
self.mox = mox.Mox()
self.stubs = stubout.StubOutForTesting()
utils.CONFIG = utils.parse_ini(utils.SAMPLE_INIFILE)
def tearDown(self):
self.mox.UnsetStubs()