X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tests%2Fbase_test.py;fp=tests%2Fbase_test.py;h=d99ce4166c6ebae64d122bb16741df20a362c0a7;hb=0113a3259ee2c5395e61ee7939268c5d91d45ac4;hp=255e71b001a537e94be3d73609f152ce69d3f785;hpb=2ea80bc54c5a10983fdb59b210b9db853a008f94;p=dak.git diff --git a/tests/base_test.py b/tests/base_test.py index 255e71b0..d99ce416 100644 --- a/tests/base_test.py +++ b/tests/base_test.py @@ -5,14 +5,16 @@ import unittest from os.path import abspath, dirname, join DAK_ROOT_DIR = dirname(dirname(abspath(__file__))) -DAK_TEST_FIXTURES = join(DAK_ROOT_DIR, 'tests', 'fixtures') class DakTestCase(unittest.TestCase): def setUp(self): pass +def fixture(*dirs): + return join(DAK_ROOT_DIR, 'tests', 'fixtures', *dirs) + os.environ['DAK_TEST'] = '1' -os.environ['DAK_CONFIG'] = join(DAK_TEST_FIXTURES, 'dak.conf') +os.environ['DAK_CONFIG'] = fixture('dak.conf') if DAK_ROOT_DIR not in sys.path: sys.path.insert(0, DAK_ROOT_DIR)