base_test.py 449 B

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