base_test.py 436 B

123456789101112131415161718192021222324
  1. import os
  2. import sys
  3. import unittest
  4. from os.path import abspath, dirname, join
  5. DAK_ROOT_DIR = dirname(dirname(abspath(__file__)))
  6. class DakTestCase(unittest.TestCase):
  7. def setUp(self):
  8. pass
  9. def fixture(*dirs):
  10. return join(DAK_ROOT_DIR, 'tests', 'fixtures', *dirs)
  11. os.environ['DAK_TEST'] = '1'
  12. os.environ['DAK_CONFIG'] = fixture('dak.conf')
  13. if DAK_ROOT_DIR not in sys.path:
  14. sys.path.insert(0, DAK_ROOT_DIR)