control.py (1477:b93d1acf81bd) control.py (1596:b7e2d4d92624)
1import json
2
3from unit.http import TestHTTP
4
5
6def args_handler(conf_func):
7 def args_wrapper(self, *args):
8 argcount = conf_func.__code__.co_argcount

--- 39 unchanged lines hidden (view full) ---

48 @args_handler
49 def conf_post(self, conf, url):
50 return self.post(**self._get_args(url, conf))['body']
51
52 def _get_args(self, url, conf=None):
53 args = {
54 'url': url,
55 'sock_type': 'unix',
1import json
2
3from unit.http import TestHTTP
4
5
6def args_handler(conf_func):
7 def args_wrapper(self, *args):
8 argcount = conf_func.__code__.co_argcount

--- 39 unchanged lines hidden (view full) ---

48 @args_handler
49 def conf_post(self, conf, url):
50 return self.post(**self._get_args(url, conf))['body']
51
52 def _get_args(self, url, conf=None):
53 args = {
54 'url': url,
55 'sock_type': 'unix',
56 'addr': self.testdir + '/control.unit.sock',
56 'addr': self.temp_dir + '/control.unit.sock',
57 }
58
59 if conf is not None:
60 args['body'] = conf
61
62 return args
57 }
58
59 if conf is not None:
60 args['body'] = conf
61
62 return args