blob: 1a48673e0a30b3601b1aec5998f5432c615bdc31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import os
import unittest
import tempfile
from devbot import config
from devbot import main
class DevbotTestCase(unittest.TestCase):
def setUp(self):
self.setup_config()
def setup_config(self, extra_args):
temp_dir = tempfile.gettempdir()
main.load_plugins()
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)
|