diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-15 21:48:58 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-15 21:48:58 (GMT) |
commit | 15882010491d9f2de6fb43f1c40d753b386c0e2b (patch) | |
tree | a30297d794cfc036c418cb375e8e2abea87908bc /tests/devbot/common.py | |
parent | 51acf16dba34336bab96591c74235c87ef397e91 (diff) |
Fix unit tests
Diffstat (limited to 'tests/devbot/common.py')
-rw-r--r-- | tests/devbot/common.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/devbot/common.py b/tests/devbot/common.py new file mode 100644 index 0000000..ace8831 --- /dev/null +++ b/tests/devbot/common.py @@ -0,0 +1,22 @@ +import os +import unittest +import tempfile + +from devbot import config + +class DevbotTestCase(unittest.TestCase): + def setUp(self): + self.setup_config() + + def setup_config(self, extra_args): + temp_dir = tempfile.gettempdir() + + args = {"logs_dir": os.path.join(temp_dir, "logs"), + "source_dir": os.path.join(temp_dir, "source"), + "build_dir": os.path.join(temp_dir, "build"), + "install_dir": os.path.join(temp_dir, "install"), + "state_dir": os.path.join(temp_dir, "state")} + + args.update(extra_args) + + config.setup(**args) |