6 from os.path import abspath, dirname, join
8 DAK_ROOT_DIR = dirname(dirname(abspath(__file__)))
10 # suppress some deprecation warnings in squeeze related to apt_pkg,
11 # debian, and md5 modules
12 warnings.filterwarnings('ignore', \
13 "Attribute '.*' of the 'apt_pkg\.Configuration' object is deprecated, use '.*' instead\.", \
15 warnings.filterwarnings('ignore', \
16 "apt_pkg\.newConfiguration\(\) is deprecated\. Use apt_pkg\.Configuration\(\) instead\.", \
18 warnings.filterwarnings('ignore', \
19 "please use 'debian' instead of 'debian_bundle'", \
21 warnings.filterwarnings('ignore', \
22 "the md5 module is deprecated; use hashlib instead", \
25 class DakTestCase(unittest.TestCase):
30 return join(DAK_ROOT_DIR, 'tests', 'fixtures', *dirs)
32 os.environ['DAK_TEST'] = '1'
33 os.environ['DAK_CONFIG'] = fixture('dak.conf')
35 if DAK_ROOT_DIR not in sys.path:
36 sys.path.insert(0, DAK_ROOT_DIR)